-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VL] Remove the registry for Velox's prestosql scalar functions #5202
[VL] Remove the registry for Velox's prestosql scalar functions #5202
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on Github Issues? https://github.com/apache/incubator-gluten/issues Then could you also rename commit message and pull request title in the following format?
See also: |
ebc1e02
to
8b37162
Compare
===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
|
Hi, could you share the current status? |
@Yohahaha, this pr depends on a velox pr: facebookincubator/velox#9425. I will try to push the review progress. |
why not choose below usage? I think velox has already support register with prefix, the only thing we need to do is choose which prefixed-function is gluten needed. correct me if it's wrong, thank you!
|
They are discussed internally. We feel it is more clear by using only one registry and we want to avoid maintaining such a map in Gluten. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
4e2e357
to
a0bda39
Compare
a0bda39
to
efce94e
Compare
0f857d2
to
0567551
Compare
@@ -67,19 +74,16 @@ void registerFunctionOverwrite() { | |||
velox::exec::registerFunctionCallToSpecialForm( | |||
kRowConstructorWithAllNull, | |||
std::make_unique<RowConstructorWithNullCallToSpecialForm>(kRowConstructorWithAllNull)); | |||
velox::functions::sparksql::registerBitwiseFunctions("spark_"); | |||
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"}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems some registrations in registerFunctionOverwrite() could be removed, including spark_rand, check_xx. After facebookincubator/velox@372abeb, we need to adapt to the new names checked_xx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I also noted this. Will create another pr to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
What changes were proposed in this pull request?
Currently, Gluten registers Velox's prestosql scalar functions. Thus, some of them can be used for Spark SQL if there is no semantic difference. However, there are some conflict issues, which makes unexpected function calling. See below links. We plan to register used presto scalar functions (see below list) in sparksql registry.
#4759
#5150
Function list:
url_decode/url_encode
array_distinct
array_except
array_position
map_entries
map_keys
map_values
reverse
crc32
regexp_extract_all
like
abs (for long/short decimal)
asin
atan
cos
degrees
How was this patch tested?
Existing tests.