dadepo commented on issue #8866:
URL:
https://github.com/apache/arrow-datafusion/issues/8866#issuecomment-1913613142
Switch the implementation to `ScalarUDFImpl` and the documentation says:
```
/// # Zero Argument Functions
/// If the function has zero parameters (e.g. `now()`) it will be passed
a
/// single element slice which is a a null array to indicate the batch's
row
/// count (so the function can know the resulting array size).
```
See
https://github.com/apache/arrow-datafusion/blob/51b898288830c224b825523f9be1d54974f15d2f/datafusion/expr/src/udf.rs#L257
When I dbg! the args passed to the a zero parameter UDF I am implementing, I
get
```
&args = [
Scalar(
NULL,
),
]
```
Which suggests to me, that a Scalar value is being passed, and not an Array
as suggested in the documentation, and hence the length cannot be deduced from
this.
--
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]