alamb commented on issue #10776:
URL: https://github.com/apache/arrow-rs/issues/10776#issuecomment-5370325229
Another example where it might be better to incrementally build the output
```rust
// Pad the tail so the filters cover `expected_rows` total. This
keeps
// the invariant that the resulting `RowSelection` spans every row
the
// reader would have produced — rows past the early break are marked
// "not selected". When no limit is set the loop always exhausts and
// no padding is needed.
if let Some(expected) = expected_rows
&& processed_rows < expected
{
let pad_len = expected - processed_rows;
filters.push(BooleanArray::new(BooleanBuffer::new_unset(pad_len), None));
}
```
(it allocates a new array)
--
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]