Commits


Joris Van den Bossche authored and GitHub committed 577cafbd8b2
GH-39220: [Python] Let RecordBatch.filter accept a boolean expression in addition to mask array (#43043) ### Rationale for this change `Table.filter()` already accepted either a boolean mask array or a boolean expression. But the equivalent method on `RecordBatch` only accepted the array. This makes both methods consistent in accepting both types of mask. ### What changes are included in this PR? Consolidate the `Table.filter` and `RecordBatch.fitler` methods into a single shared method on the base class, and expanded the `_filter_table` Acero helper to also work with RecordBatch in addition to Table (and ensure to return a batch if the input was a batch) ### Are these changes tested? Yes * GitHub Issue: #39220 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Will Jones <willjones127@gmail.com>