jayzhan211 commented on code in PR #10148:
URL: https://github.com/apache/datafusion/pull/10148#discussion_r1581838702
##########
datafusion/physical-expr/src/scalar_function.rs:
##########
@@ -146,11 +146,22 @@ impl PhysicalExpr for ScalarFunctionExpr {
// evaluate the function
match self.fun {
ScalarFunctionDefinition::UDF(ref fun) => {
- if self.args.is_empty() {
- fun.invoke_no_args(batch.num_rows())
- } else {
- fun.invoke(&inputs)
+ let output = match self.args.is_empty() {
+ true => fun.invoke_no_args(batch.num_rows()),
+ false => fun.invoke(&inputs),
+ }?;
+
+ if fun.validate_number_of_rows() {
+ let output_size = match &output {
+ ColumnarValue::Array(array) => array.len(),
+ ColumnarValue::Scalar(_) => 1,
Review Comment:
> MAPs must have a single type for all keys, and a single type for all values
--
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]