Skip to content

Commit

Permalink
[VL] Fix negative function mapping (#5481)
Browse files Browse the repository at this point in the history
[VL] Fix negative function mapping.
  • Loading branch information
zhli1142015 authored Apr 22, 2024
1 parent b4641c9 commit 6100b60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -805,4 +805,10 @@ class ScalarFunctionsValidateSuite extends FunctionsValidateTest {
}
}

test("negative") {
runQueryAndCompare("select negative(l_orderkey) from lineitem") {
checkGlutenOperatorMatch[ProjectExecTransformer]
}
}

}
3 changes: 2 additions & 1 deletion cpp/velox/substrait/SubstraitParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit 6100b60

Please sign in to comment.