This is an automated email from the ASF dual-hosted git repository.
philo 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 b65ecced2 [VL] Remove useless function registering code (#6245)
b65ecced2 is described below
commit b65ecced292b9defdc10d6d5e3a46f43c28fd84c
Author: PHILO-HE <[email protected]>
AuthorDate: Thu Jun 27 14:06:26 2024 +0800
[VL] Remove useless function registering code (#6245)
---
.../operators/functions/RegistrationAllFunctions.cc | 7 -------
.../apache/gluten/expression/ExpressionConverter.scala | 16 ++++++++--------
.../org/apache/gluten/expression/ExpressionNames.scala | 8 ++++----
3 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/cpp/velox/operators/functions/RegistrationAllFunctions.cc
b/cpp/velox/operators/functions/RegistrationAllFunctions.cc
index 638dbcccf..6b6564fa4 100644
--- a/cpp/velox/operators/functions/RegistrationAllFunctions.cc
+++ b/cpp/velox/operators/functions/RegistrationAllFunctions.cc
@@ -52,9 +52,6 @@ void registerFunctionOverwrite() {
velox::registerFunction<RoundFunction, int64_t, int64_t, int32_t>({"round"});
velox::registerFunction<RoundFunction, double, double, int32_t>({"round"});
velox::registerFunction<RoundFunction, float, float, int32_t>({"round"});
- // TODO: the below rand function registry can be removed after presto
function registry is removed.
- velox::registerFunction<velox::functions::sparksql::RandFunction, double,
velox::Constant<int32_t>>({"spark_rand"});
- velox::registerFunction<velox::functions::sparksql::RandFunction, double,
velox::Constant<int64_t>>({"spark_rand"});
auto kRowConstructorWithNull =
RowConstructorWithNullCallToSpecialForm::kRowConstructorWithNull;
velox::exec::registerVectorFunction(
@@ -74,10 +71,6 @@ void registerFunctionOverwrite() {
velox::exec::registerFunctionCallToSpecialForm(
kRowConstructorWithAllNull,
std::make_unique<RowConstructorWithNullCallToSpecialForm>(kRowConstructorWithAllNull));
-
velox::functions::registerBinaryIntegral<velox::functions::CheckedPlusFunction>({"check_add"});
-
velox::functions::registerBinaryIntegral<velox::functions::CheckedMinusFunction>({"check_subtract"});
-
velox::functions::registerBinaryIntegral<velox::functions::CheckedMultiplyFunction>({"check_multiply"});
-
velox::functions::registerBinaryIntegral<velox::functions::CheckedDivideFunction>({"check_divide"});
velox::functions::registerPrestoVectorFunctions();
}
diff --git
a/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionConverter.scala
b/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionConverter.scala
index da5625cd4..d5222cfc6 100644
---
a/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionConverter.scala
+++
b/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionConverter.scala
@@ -564,7 +564,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
tryEval,
- ExpressionNames.CHECK_ADD
+ ExpressionNames.CHECKED_ADD
)
case tryEval @ TryEval(a: Subtract) =>
BackendsApiManager.getSparkPlanExecApiInstance.genTryArithmeticTransformer(
@@ -572,7 +572,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
tryEval,
- ExpressionNames.CHECK_SUBTRACT
+ ExpressionNames.CHECKED_SUBTRACT
)
case tryEval @ TryEval(a: Divide) =>
BackendsApiManager.getSparkPlanExecApiInstance.genTryArithmeticTransformer(
@@ -580,7 +580,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
tryEval,
- ExpressionNames.CHECK_DIVIDE
+ ExpressionNames.CHECKED_DIVIDE
)
case tryEval @ TryEval(a: Multiply) =>
BackendsApiManager.getSparkPlanExecApiInstance.genTryArithmeticTransformer(
@@ -588,7 +588,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
tryEval,
- ExpressionNames.CHECK_MULTIPLY
+ ExpressionNames.CHECKED_MULTIPLY
)
case a: Add =>
BackendsApiManager.getSparkPlanExecApiInstance.genArithmeticTransformer(
@@ -596,7 +596,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
a,
- ExpressionNames.CHECK_ADD
+ ExpressionNames.CHECKED_ADD
)
case a: Subtract =>
BackendsApiManager.getSparkPlanExecApiInstance.genArithmeticTransformer(
@@ -604,7 +604,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
a,
- ExpressionNames.CHECK_SUBTRACT
+ ExpressionNames.CHECKED_SUBTRACT
)
case a: Multiply =>
BackendsApiManager.getSparkPlanExecApiInstance.genArithmeticTransformer(
@@ -612,7 +612,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
a,
- ExpressionNames.CHECK_MULTIPLY
+ ExpressionNames.CHECKED_MULTIPLY
)
case a: Divide =>
BackendsApiManager.getSparkPlanExecApiInstance.genArithmeticTransformer(
@@ -620,7 +620,7 @@ object ExpressionConverter extends SQLConfHelper with
Logging {
replaceWithExpressionTransformerInternal(a.left, attributeSeq,
expressionsMap),
replaceWithExpressionTransformerInternal(a.right, attributeSeq,
expressionsMap),
a,
- ExpressionNames.CHECK_DIVIDE
+ ExpressionNames.CHECKED_DIVIDE
)
case tryEval: TryEval =>
// This is a placeholder to handle try_eval(other expressions).
diff --git
a/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
b/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
index 2be3fad9d..8317e28b5 100644
---
a/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
+++
b/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
@@ -83,10 +83,10 @@ object ExpressionNames {
final val IS_NAN = "isnan"
final val NANVL = "nanvl"
final val TRY_EVAL = "try"
- final val CHECK_ADD = "check_add"
- final val CHECK_SUBTRACT = "check_subtract"
- final val CHECK_DIVIDE = "check_divide"
- final val CHECK_MULTIPLY = "check_multiply"
+ final val CHECKED_ADD = "checked_add"
+ final val CHECKED_SUBTRACT = "checked_subtract"
+ final val CHECKED_DIVIDE = "checked_divide"
+ final val CHECKED_MULTIPLY = "checked_multiply"
// SparkSQL String functions
final val ASCII = "ascii"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]