alamb commented on issue #6692:
URL: https://github.com/apache/arrow-rs/issues/6692#issuecomment-2786490982

   > Thoughts?
   
   I still don't understand why extending the ArrayBuilders with "native" 
support for appending filtered/take output isn't a viable solution, such as:
   
   ```rust
   let mut builder = StringViewBuilder::new();
   while let Some(input) = stream.next() {
     // compute some subset of input rows that make it to the output
     let filter: BooleanArray = compute_filter(&input, ....); 
     // append all rows from input where filter[i] is true
     builder.append_filtered(&input, &filter);
   }
   ```
   
   > The challenge with using ArrayBuilder is that builders don't sufficiently 
expose their internals for kernel implementations.
   
   This is exactly why I am suggesting the filter/take thing in the 
ArrayBuilder itself -- where the low level details of the source/target arrays 
can be used.
   
   If the concern is that adding filter/take code in the `arrow-array` module 
woud increase code bloat too much I am sure we could sort that out somehow.
   
   


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

Reply via email to