jaylmiller commented on code in PR #5380:
URL: https://github.com/apache/arrow-datafusion/pull/5380#discussion_r1117436279
##########
datafusion/physical-expr/src/planner.rs:
##########
@@ -393,7 +393,10 @@ pub fn create_physical_expr(
execution_props,
)?);
}
-
+ // udfs with zero params expect null array as input
+ if args.is_empty() {
+ physical_args.push(Arc::new(Literal::new(ScalarValue::Null)));
Review Comment:
I agree it was not the best solution. The reason why I thought to do it this
way is because the existing docs state:
> ...with the exception of zero param function, where a singular element vec
will be passed. In that case the single element is a null array to indicate
the batch's row count (so that the generative zero-argument function can know
the result array size).
Is it safe to assume I should update this part of the docs according to my
implementation?
--
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]