Dandandan commented on a change in pull request #291:
URL: https://github.com/apache/arrow-datafusion/pull/291#discussion_r628876286



##########
File path: datafusion/src/physical_plan/hash_join.rs
##########
@@ -1410,6 +1413,45 @@ mod tests {
         assert_batches_sorted_eq!(expected, &batches);
     }
 
+    #[tokio::test]
+    async fn join_outer_multi_batch() {
+        let left = build_table(
+            ("a1", &vec![1, 2, 3]),
+            ("b1", &vec![4, 5, 7]), // 7 does not exist on the right
+            ("c1", &vec![7, 8, 9]),
+        );
+        let right = build_table_two_batches(
+            ("a2", &vec![10, 20, 30]),
+            ("b1", &vec![4, 5, 6]),
+            ("c2", &vec![70, 80, 90]),
+        );
+        let on = &[("b1", "b1")];
+
+        let join = join(left, right, on, &JoinType::Full).unwrap();
+
+        let columns = columns(&join.schema());
+        assert_eq!(columns, vec!["a1", "b1", "c1", "a2", "c2"]);
+
+        let stream = join.execute(0).await.unwrap();
+        let batches = common::collect(stream).await.unwrap();
+
+        let expected = vec![

Review comment:
       The test here tests having two (equivalent) batches at the right side.
   So they will produce two rows for the right rows and one for the left row 
that doesnt match the right row.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to