-
Notifications
You must be signed in to change notification settings - Fork 270
feat: aes encrypt support #3211
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
base: main
Are you sure you want to change the base?
feat: aes encrypt support #3211
Conversation
|
Findings with first version , where there was no improvements in benchmarks :
|
|
Got improvements : |
| override def convert(expr: T, inputs: Seq[Attribute], binding: Boolean): Option[Expr] = { | ||
| val childExpr = expr.children.map(exprToProtoInternal(_, inputs, binding)) | ||
| val optExpr = scalarFunctionExprToProto(name, childExpr: _*) | ||
| // Pass return type to avoid native lookup in DataFusion registry |
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.
When expr.return_type is None, it tries to look up the function in DataFusion's built-in UDF registry , which doesn't have aes_encrypt because it's a Comet-specific function registered later via create_comet_physical_fun
|
Benchmark result : |
Which issue does this PR close?
Closes #3187
Rationale for this change
The aes_encrypt function was fully implemented.
CometScalarFunction serialized expressions to protobuf without including the return type. This caused the native planner to attempt looking up the function in DataFusion's built-in UDF registry, which failed with "There is no UDF named 'aes_encrypt' in the registry."
What changes are included in this PR?
- Changed to use scalarFunctionExprToProtoWithReturnType() instead of scalarFunctionExprToProto()
- Now passes expr.dataType to avoid native registry lookup
- Enables native execution for all Comet-specific scalar functions
How are these changes tested?