This is an automated email from the ASF dual-hosted git repository.
marong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 8aefd875e [VL] Daily Update Velox Version (2024_03_26) (#5115)
8aefd875e is described below
commit 8aefd875ed151a568746e939085ea52e56751aed
Author: Rong Ma <[email protected]>
AuthorDate: Tue Mar 26 17:44:53 2024 +0800
[VL] Daily Update Velox Version (2024_03_26) (#5115)
---
cpp/velox/operators/functions/RegistrationAllFunctions.cc | 3 ++-
cpp/velox/operators/functions/RowConstructorWithNull.cc | 14 ++++++++++----
cpp/velox/operators/functions/RowFunctionWithNull.h | 5 +++--
ep/build-velox/src/get_velox.sh | 2 +-
4 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/cpp/velox/operators/functions/RegistrationAllFunctions.cc
b/cpp/velox/operators/functions/RegistrationAllFunctions.cc
index 4ff19be93..a11963446 100644
--- a/cpp/velox/operators/functions/RegistrationAllFunctions.cc
+++ b/cpp/velox/operators/functions/RegistrationAllFunctions.cc
@@ -56,7 +56,8 @@ void registerFunctionOverwrite() {
velox::exec::registerVectorFunction(
"row_constructor_with_null",
std::vector<std::shared_ptr<velox::exec::FunctionSignature>>{},
- std::make_unique<RowFunctionWithNull>());
+ std::make_unique<RowFunctionWithNull>(),
+ RowFunctionWithNull::metadata());
velox::exec::registerFunctionCallToSpecialForm(
RowConstructorWithNullCallToSpecialForm::kRowConstructorWithNull,
std::make_unique<RowConstructorWithNullCallToSpecialForm>());
diff --git a/cpp/velox/operators/functions/RowConstructorWithNull.cc
b/cpp/velox/operators/functions/RowConstructorWithNull.cc
index 411dd478e..955d957e2 100644
--- a/cpp/velox/operators/functions/RowConstructorWithNull.cc
+++ b/cpp/velox/operators/functions/RowConstructorWithNull.cc
@@ -37,14 +37,20 @@ facebook::velox::exec::ExprPtr
RowConstructorWithNullCallToSpecialForm::construc
std::vector<facebook::velox::exec::ExprPtr>&& compiledChildren,
bool trackCpuUsage,
const facebook::velox::core::QueryConfig& config) {
- auto rowConstructorVectorFunction =
- facebook::velox::exec::vectorFunctionFactories().withRLock([&config,
&name](auto& functionMap) {
+ auto [function, metadata] =
facebook::velox::exec::vectorFunctionFactories().withRLock(
+ [&config, &name](auto& functionMap) -> std::pair<
+
std::shared_ptr<facebook::velox::exec::VectorFunction>,
+
facebook::velox::exec::VectorFunctionMetadata> {
auto functionIterator = functionMap.find(name);
- return functionIterator->second.factory(name, {}, config);
+ if (functionIterator != functionMap.end()) {
+ return {functionIterator->second.factory(name, {}, config),
functionIterator->second.metadata};
+ } else {
+ VELOX_FAIL("Function {} is not registered.", name);
+ }
});
return std::make_shared<facebook::velox::exec::Expr>(
- type, std::move(compiledChildren), rowConstructorVectorFunction, name,
trackCpuUsage);
+ type, std::move(compiledChildren), function, metadata, name,
trackCpuUsage);
}
facebook::velox::exec::ExprPtr
RowConstructorWithNullCallToSpecialForm::constructSpecialForm(
diff --git a/cpp/velox/operators/functions/RowFunctionWithNull.h
b/cpp/velox/operators/functions/RowFunctionWithNull.h
index d66fda99e..9ed6bc277 100644
--- a/cpp/velox/operators/functions/RowFunctionWithNull.h
+++ b/cpp/velox/operators/functions/RowFunctionWithNull.h
@@ -26,6 +26,7 @@ namespace gluten {
* A customized RowFunction to set struct as null when one of its argument is
null.
*/
class RowFunctionWithNull final : public facebook::velox::exec::VectorFunction
{
+ public:
void apply(
const facebook::velox::SelectivityVector& rows,
std::vector<facebook::velox::VectorPtr>& args,
@@ -58,8 +59,8 @@ class RowFunctionWithNull final : public
facebook::velox::exec::VectorFunction {
context.moveOrCopyResult(localResult, rows, result);
}
- bool isDefaultNullBehavior() const override {
- return false;
+ static facebook::velox::exec::VectorFunctionMetadata metadata() {
+ return
facebook::velox::exec::VectorFunctionMetadataBuilder().defaultNullBehavior(false).build();
}
};
diff --git a/ep/build-velox/src/get_velox.sh b/ep/build-velox/src/get_velox.sh
index 074f80918..767585e91 100755
--- a/ep/build-velox/src/get_velox.sh
+++ b/ep/build-velox/src/get_velox.sh
@@ -17,7 +17,7 @@
set -exu
VELOX_REPO=https://github.com/oap-project/velox.git
-VELOX_BRANCH=2024_03_25
+VELOX_BRANCH=2024_03_26
VELOX_HOME=""
#Set on run gluten on HDFS
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]