-
Notifications
You must be signed in to change notification settings - Fork 457
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
Add supported backend information in Sig (signature for a expression) #5700
Comments
cc @PHILO-HE does this make sense? Please let me know if I missed anything. Thanks. |
Hi @ivoson, thanks for your proposal! Actually, a kind of validate-by-trying-offloading (covering Java/Scala code & native code) is introduced in Gluten to reduce code maintenance efforts. At least for Velox backend (CH backend may still have some gaps to support validate-by-trying-offloading), if validation process fails (e.g., function signature is not found in velox), we expect fallback happens. Maybe, there are some cases that the expected fallback doesn't happen when validation fails. Do you have any findings that need us to fix? Thanks! |
@PHILO-HE thanks for the response. I didn't find any cases need to be fixed. I created this issue because that I supposed the functions added in |
@ivoson, I think it is not worth doing that. cc @FelixYBW, @zhouyuan |
In our plan, the validation should all happens in native library. native library should have all the info it supports the expression/operators or not. But Velox itself doesn't have this feature due to its low priority, we still put all the logic in Gluten c++ now. It's where the mismatch comes from. It should be tracked when we nightly rebase to Velox but currently we didn't. How the sig() function can solve the mismatch issue |
Thanks @PHILO-HE @FelixYBW for your explanation. The proposal is not targeting for plan validation, it's more like a metadata to point out the expression is supported by which backend. For example, adding the metadata in Sig like
|
We had this API incubator-gluten/gluten-core/src/main/scala/org/apache/gluten/backendsapi/SparkPlanExecApi.scala Line 556 in 182a029
|
Thanks @zhztheplayer. I noticed this, but I am not very clear about what's is the design purpose of this API. In the very beginning, I supposed that the expressions defined in |
@ivoson, some functions have multiple signatures. And it is possible that not all signatures are supported by native engine. If we add a fag in |
Understood. As the potential changes could introduce maintenance burden, closing the issue. |
Description
Sig
is a mapping from spark expression to substrait name, used to convert spark functions to substrait and offload the funciton.Currently, it includes below information:
IIUC all the registered functions are maintained in
ExpressionMappings
and serve for both velox and clickhouse backend. But some of them are supported by only one of the backend. For example:Expm1
andStringLocate
are only supported by clickhouse.In the mapping, it's hard to tell which function is supported by which backend. Adding supported backend information here might be helpful for the maintenance/track the status of the functions.
The text was updated successfully, but these errors were encountered: