andishgar commented on issue #46177:
URL: https://github.com/apache/arrow/issues/46177#issuecomment-2838305341

   > Thanks for looking into these [@andishgar](https://github.com/andishgar) ! 
We could certainly make better use of preallocation.
   > 
   > Of note: for the `*View` output types, it might even be reasonable to use 
[`ScalarKernel::can_write_into_slices`](https://github.com/apache/arrow/blob/c2ec1cda88918a3920b7b29eca8d2e3ca7a49fb2/cpp/src/arrow/compute/kernel.h#L564C8-L564C30)
 which in turn can enable [contiguous 
preallocation](https://github.com/apache/arrow/blob/0580deeab4731e41e5c993d2f5f068e462118c3a/cpp/src/arrow/compute/exec.cc#L995-L998).
 StringViews can refer to multiple data buffers, so it'd even be possible to 
append to different data buffers from different threads
   
   My current understanding is limited to ScalarFunction. However, I have two 
questions:
   
   1-Why is no buffer data allocated for string data types? For compute 
functions like `ascii_upper`, can the output data buffer length be inferred 
from the input?
   2-Are Scalar compute functions executed using multi-threading? (I’m aware of 
other compute functions but haven’t studied them yet.)


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to