You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Shekharrajak (via GitHub)" <gi...@apache.org> on 2026/01/18 15:31:16 UTC
Re: [PR] feat: aes encrypt support [datafusion-comet]
Shekharrajak commented on code in PR #3211:
URL: https://github.com/apache/datafusion-comet/pull/3211#discussion_r2702481382
##########
spark/src/main/scala/org/apache/comet/serde/CometScalarFunction.scala:
##########
@@ -22,13 +22,15 @@ package org.apache.comet.serde
import org.apache.spark.sql.catalyst.expressions.{Attribute, Expression}
import org.apache.comet.serde.ExprOuterClass.Expr
-import org.apache.comet.serde.QueryPlanSerde.{exprToProtoInternal, optExprWithInfo, scalarFunctionExprToProto}
+import org.apache.comet.serde.QueryPlanSerde.{exprToProtoInternal, optExprWithInfo, scalarFunctionExprToProtoWithReturnType}
/** Serde for scalar function. */
case class CometScalarFunction[T <: Expression](name: String) extends CometExpressionSerde[T] {
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
Review Comment:
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org