This is an automated email from the ASF dual-hosted git repository.
zhli 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 6100b60a8 [VL] Fix negative function mapping (#5481)
6100b60a8 is described below
commit 6100b60a8b08fac348739b2ac0b252f9c274eba4
Author: Zhen Li <[email protected]>
AuthorDate: Tue Apr 23 07:38:57 2024 +0800
[VL] Fix negative function mapping (#5481)
[VL] Fix negative function mapping.
---
.../org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala | 6 ++++++
cpp/velox/substrait/SubstraitParser.cc | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git
a/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
b/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
index b885a59c0..93f82f752 100644
---
a/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
+++
b/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
@@ -805,4 +805,10 @@ class ScalarFunctionsValidateSuite extends
FunctionsValidateTest {
}
}
+ test("negative") {
+ runQueryAndCompare("select negative(l_orderkey) from lineitem") {
+ checkGlutenOperatorMatch[ProjectExecTransformer]
+ }
+ }
+
}
diff --git a/cpp/velox/substrait/SubstraitParser.cc
b/cpp/velox/substrait/SubstraitParser.cc
index 4bef97a60..9050c2ec8 100644
--- a/cpp/velox/substrait/SubstraitParser.cc
+++ b/cpp/velox/substrait/SubstraitParser.cc
@@ -405,7 +405,8 @@ std::unordered_map<std::string, std::string>
SubstraitParser::substraitVeloxFunc
{"collect_set", "set_agg"},
{"try_add", "plus"},
{"forall", "all_match"},
- {"exists", "any_match"}};
+ {"exists", "any_match"},
+ {"negative", "unaryminus"}};
const std::unordered_map<std::string, std::string> SubstraitParser::typeMap_ =
{
{"bool", "BOOLEAN"},
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]