2010YOUY01 commented on code in PR #8258:
URL: https://github.com/apache/arrow-datafusion/pull/8258#discussion_r1398697965


##########
datafusion/expr/src/tree_node/expr.rs:
##########
@@ -276,12 +276,19 @@ impl TreeNode for Expr {
                 asc,
                 nulls_first,
             )),
-            Expr::ScalarFunction(ScalarFunction { args, fun }) => 
Expr::ScalarFunction(
-                ScalarFunction::new(fun, transform_vec(args, &mut transform)?),
-            ),
-            Expr::ScalarUDF(ScalarUDF { args, fun }) => {
-                Expr::ScalarUDF(ScalarUDF::new(fun, transform_vec(args, &mut 
transform)?))
-            }
+            Expr::ScalarFunction(ScalarFunction { func_def, args }) => match 
func_def {
+                ScalarFunctionDefinition::BuiltIn(fun) => Expr::ScalarFunction(
+                    ScalarFunction::new(fun, transform_vec(args, &mut 
transform)?),
+                ),
+                ScalarFunctionDefinition::UDF(fun) => Expr::ScalarFunction(
+                    ScalarFunction::new_udf(fun, transform_vec(args, &mut 
transform)?),
+                ),
+                ScalarFunctionDefinition::Name(_) => {
+                    return internal_err!(

Review Comment:
   Yes, I believe it's necessary, but I'm not sure how it will be implemented 
right now, so I plan to leave this change to next PR which resolves function 
`Expr` name



-- 
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]

Reply via email to