Dandandan commented on code in PR #8951:
URL: https://github.com/apache/arrow-rs/pull/8951#discussion_r2701178041


##########
arrow-select/src/coalesce/byte_view.rs:
##########
@@ -347,6 +348,33 @@ impl<B: ByteViewType> InProgressArray for 
InProgressByteViewArray<B> {
         Ok(())
     }
 
+    fn copy_rows_by_filter(
+        &mut self,
+        filter: &FilterPredicate,
+        offset: usize,
+        len: usize,
+    ) -> Result<(), ArrowError> {
+        // Temporarily swap out the source with a filtered slice
+        let Some(source) = self.source.as_mut() else {
+            return Err(ArrowError::InvalidArgumentError(
+                "Internal Error: InProgressByteViewArray: source not 
set".to_string(),
+            ));
+        };
+        // TODO special case offset 0 to skip this nonsense
+        let source_slice = source.array.slice(offset, len);
+        let filtered = filter.filter(&source_slice)?;
+        let old_source = std::mem::replace(&mut source.array, filtered);

Review Comment:
   I think we have to call `set_source` to calculate `need_gc` etc. for the 
filtered 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]

Reply via email to