martin-g commented on code in PR #8693:
URL: https://github.com/apache/arrow-rs/pull/8693#discussion_r2460148363


##########
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();
+    if num_cols > 1
+        || (num_cols > 0 && 
multiple_arrays(record_batch.schema_ref().field(0).data_type()))
+    {
         // Only optimize if filtering more than one column

Review Comment:
   ```suggestion
           // Only optimize if filtering more than one column or if the column 
contains multiple internal arrays
   ```



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