velox
velox copied to clipboard
Fix warnings caused by -Wunused-but-set-variable
Variable values would not be used if the condition if constexpr (std::is_same_v<T, StringView>) is true.
/__w/incubator-gluten/incubator-gluten/cpp/../ep/build-velox/build/velox_ep/velox/exec/RowContainer.h:1416:3: required from here
/__w/incubator-gluten/incubator-gluten/cpp/../ep/build-velox/build/velox_ep/velox/exec/RowContainer.h:962:10: warning: variable 'values' set but not used [-Wunused-but-set-variable]
962 | auto values = valuesBuffer->asMutableRange<T>();
| ^~~~~~
/__w/incubator-gluten/incubator-gluten/cpp/../ep/build-velox/build/velox_ep/velox/exec/RowContainer.h: In instantiation of 'static void facebook::velox::exec::RowContainer::extractValuesWithNulls(const char* const*, folly::Range<const int*>, int32_t, int32_t, int32_t, uint8_t, int32_t, facebook::velox::FlatVector<T>*) [with bool useRowNumbers = true; T = facebook::velox::StringView; int32_t = int; uint8_t = unsigned char]':
/__w/incubator-gluten/incubator-gluten/cpp/../ep/build-velox/build/velox_ep/velox/exec/RowContainer.h:850:47: required from 'static void facebook::velox::exec::RowContainer::extractColumnTypedInternal(const char* const*, folly::Range<const int*>, int32_t, facebook::velox::exec::RowColumn, int32_t, const VectorPtr&) [with bool useRowNumbers = true; facebook::velox::TypeKind Kind = facebook::velox::TypeKind::VARCHAR; int32_t = int; facebook::velox::VectorPtr = std::shared_ptr<facebook::velox::BaseVector>]'
/__w/incubator-gluten/incubator-gluten/cpp/../ep/build-velox/build/velox_ep/velox/exec/RowContainer.h:817:45: required from 'static void facebook::velox::exec::RowContainer::extractColumnTyped(const char* const*, folly::Range<const int*>, int32_t, facebook::velox::exec::RowColumn, int32_t, const VectorPtr&) [with facebook::velox::TypeKind Kind = facebook::velox::TypeKind::VARCHAR; int32_t = int; facebook::velox::VectorPtr = std::shared_ptr<facebook::velox::BaseVector>]'
/__w/incubator-gluten/incubator-gluten/cpp/../ep/build-velox/build/velox_ep/velox/exec/RowContainer.h:1416:3: required from here
/__w/incubator-gluten/incubator-gluten/cpp/../ep/build-velox/build/velox_ep/velox/exec/RowContainer.h:928:10: warning: variable 'values' set but not used [-Wunused-but-set-variable]
928 | auto values = valuesBuffer->asMutableRange<T>();
| ^~~~~~
Deploy Preview for meta-velox canceled.
| Name | Link |
|---|---|
| Latest commit | 3661aa7c32f9fbee1025b2158896dad6fceeec35 |
| Latest deploy log | https://app.netlify.com/sites/meta-velox/deploys/667ea5d2906a530008a33264 |
@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
The CI build failed because the FOLLY_MAYBE_UNUSED macro could not be found in the specified version of Folly (https://github.com/facebook/folly/archive/refs/tags/v2024.04.01.00.tar.gz). Let's replace it with the [[maybe_unused]] attribute instead.
In file included from /__w/velox/velox/velox/./velox/exec/Spiller.h:21,
from /__w/velox/velox/velox/./velox/exec/Driver.h:31,
from /__w/velox/velox/velox/./velox/exec/Operator.h:21,
from /__w/velox/velox/velox/./velox/exec/tests/utils/QueryAssertions.h:21,
from /__w/velox/velox/velox/./velox/exec/tests/utils/AssertQueryBuilder.h:18,
from /__w/velox/velox/velox/velox/expression/tests/ExpressionRunner.cpp:22:
/__w/velox/velox/velox/./velox/exec/RowContainer.h: In static member function 'static void facebook::velox::exec::RowContainer::extractValuesWithNulls(const char* const*, folly::Range<const int*>, int32_t, int32_t, int32_t, uint8_t, int32_t, facebook::velox::FlatVector<T>*)':
/__w/velox/velox/velox/./velox/exec/RowContainer.h:928:5: error: 'FOLLY_MAYBE_UNUSED' was not declared in this scope; did you mean 'FMT_MAYBE_UNUSED'?
928 | FOLLY_MAYBE_UNUSED auto values = valuesBuffer->asMutableRange<T>();
| ^~~~~~~~~~~~~~~~~~
| FMT_MAYBE_UNUSED
/__w/velox/velox/velox/./velox/exec/RowContainer.h:945:11: error: 'values' was not declared in this scope; did you mean 'valueAt'?
945 | values[resultIndex] = valueAt<T>(row, offset);
| ^~~~~~
| valueAt
HI @kecookier Please give me couple more days to land this ; have to fix a few failing builds related to this internally.
HI @kecookier Please give me couple more days to land this ; have to fix a few failing builds related to this internally.
Thanks!
@kecookier can you please resolve the CI failures
@kecookier can you please resolve the CI failures
I will work on fixing it as soon as possible. Thank you for your patience.
@kecookier You need to rebase your branch with main to fix the CI failure.
@majetideepak I have rebased the main branch. Could you please help trigger the CI?
@bikramSingh91 Just a friendly ping, the CI has been fixed. Could you please help merge it?
@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@xiaoxmeng merged this pull request in facebookincubator/velox@5aaae7d08f96c164beffdc8e4e495d37c5d7caa5.
Conbench analyzed the 1 benchmark run on commit 5aaae7d0.
There were no benchmark performance regressions. 🎉
The full Conbench report has more details.