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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to