Rich-T-kid commented on code in PR #11519:
URL: https://github.com/apache/arrow-rs/pull/11519#discussion_r4244615414


##########
arrow-select/src/coalesce.rs:
##########
@@ -2727,6 +2765,45 @@ mod tests {
         assert_eq!(expected, actual);
     }
 
+    #[test]
+    fn test_push_batch_interleaved() {
+        let batch1 = record_batch!(("a", Int32, [10, 11, 12])).unwrap();
+        let batch2 = record_batch!(("a", Int32, [20, 21, 22])).unwrap();
+        let indices = [(0, 0), (1, 2), (0, 2), (1, 0)];
+
+        let mut coalescer = BatchCoalescer::new(batch1.schema(), 1000);
+        coalescer
+            .push_batch_interleaved(&[batch1, batch2], &indices)
+            .unwrap();
+        coalescer.finish_buffered_batch().unwrap();
+
+        let expected = record_batch!(("a", Int32, [10, 22, 12, 20])).unwrap();
+        assert_eq!(coalescer.next_completed_batch().unwrap(), expected);
+    }
+
+    #[test]
+    fn test_push_batch_interleaved_matches_interleave_then_push() {

Review Comment:
   seems a bit counter intuitive because we are currently just doing what 
`push_batch_interleaved` does but in the future this shouldn't be the case



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