neilconway opened a new issue, #21100:
URL: https://github.com/apache/datafusion/issues/21100

   ### Is your feature request related to a problem or challenge?
   
   In the current implementation, for each row in the batch we construct a 
`PrimitiveArray` for the row, feed it to Arrow `min` / `max`, and then collects 
the resulting `ScalarValue`s in a `Vec`. We then construct a final 
`PrimitiveArray` for the result via `ScalarValue::iter_to_array`. There's a 
bunch of overhead here: constructing N intermediate `PrimitiveArray` values 
plus the `Vec`, dynamic dispatch, Arc refcount bumps, etc.
   
   We can do better by just iterating over the flat values buffer directly: 
that's already a `PrimitiveArray`, so we can just invoke the Arrow compute 
kernel ourselves on the appropriate slice of the array for each row.
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to