At the moment ARROW-16286 prevents us from using ExecuteScalarExpression on nullary functions. However, if we bypass constant folding, then we run into another problem. The batch passed to the function always has length = 1.
This appears to be tied up with the logic of ExecBatchIterator that I don't quite follow entirely. However, we should be preserving the batch length of the input to ExecuteScalarExpression and passing that to the function.
Reporter: Weston Pace / @westonpace
Note: This issue was originally created as ARROW-16290. Please see the migration documentation for further details.