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


##########
arrow-select/src/coalesce.rs:
##########
@@ -564,6 +571,92 @@ impl BatchCoalescer {
     pub fn next_completed_batch(&mut self) -> Option<RecordBatch> {
         self.completed.pop_front()
     }
+
+    fn push_batch_with_indices_direct(
+        &mut self,
+        batch: RecordBatch,
+        indices: &dyn Array,
+    ) -> Result<(), ArrowError> {
+        if indices.is_empty() {
+            return Ok(());
+        }
+
+        if self.should_materialize_large_take(indices.len()) {
+            let taken_batch = take_record_batch(&batch, indices)?;

Review Comment:
   Shouldn't it cap `indices` at limit?



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