You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by "jayzhan211 (via GitHub)" <gi...@apache.org> on 2024/04/20 08:27:03 UTC

Re: [PR] Minor: Validate UDF input and ouput size [datafusion]

jayzhan211 commented on code in PR #10148:
URL: https://github.com/apache/datafusion/pull/10148#discussion_r1573207348


##########
datafusion/physical-expr/src/scalar_function.rs:
##########
@@ -177,7 +177,18 @@ impl PhysicalExpr for ScalarFunctionExpr {
                 let fun = create_physical_fun(fun)?;
                 (fun)(&inputs)
             }
-            ScalarFunctionDefinition::UDF(ref fun) => fun.invoke(&inputs),
+            ScalarFunctionDefinition::UDF(ref fun) => {
+                let output = fun.invoke(&inputs)?;
+                let output_count = match &output {

Review Comment:
   https://github.com/apache/datafusion/blob/19356b26f515149f96f9b6296975a77ac7260149/datafusion/functions/src/utils.rs#L108
   
   I think we should check it inside the function wrapper



-- 
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: commits-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org