alamb commented on code in PR #8693:
URL: https://github.com/apache/arrow-rs/pull/8693#discussion_r2456753863
##########
arrow-select/src/filter.rs:
##########
@@ -173,20 +173,17 @@ pub fn filter_record_batch(
predicate: &BooleanArray,
) -> Result<RecordBatch, ArrowError> {
let mut filter_builder = FilterBuilder::new(predicate);
- if record_batch.num_columns() > 1 {
+ let num_cols = record_batch.num_columns();
Review Comment:
this is also a nice improvement (to also account for arrays with multiple
children)
##########
arrow-select/src/filter.rs:
##########
@@ -300,6 +297,31 @@ impl FilterPredicate {
filter_array(values, self)
}
+ /// Returns a filtered [`RecordBatch`] containing only the rows that are
selected by this
+ /// [`FilterPredicate`].
+ ///
+ /// This is the equivalent of calling [filter] on each column of the
[`RecordBatch`].
Review Comment:
It is also the equivalent of calling
https://docs.rs/arrow/latest/arrow/compute/fn.filter_record_batch.html
```suggestion
/// This is the equivalent of calling [filter] on each column of the
[`RecordBatch`].
///
/// See also [`filter_record_batch`]
```
--
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]