alamb commented on a change in pull request #291: URL: https://github.com/apache/arrow-datafusion/pull/291#discussion_r629226166
########## File path: datafusion/src/physical_plan/hash_join.rs ########## @@ -1590,36 +1591,36 @@ mod tests { } #[tokio::test] - async fn join_outer_one() -> Result<()> { + async fn join_full_one() -> Result<()> { 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( ("a2", &vec![10, 20, 30]), - ("b1", &vec![4, 5, 6]), + ("b2", &vec![4, 5, 6]), ("c2", &vec![70, 80, 90]), ); - let on = &[("b1", "b1")]; + let on = &[("b1", "b2")]; let join = join(left, right, on, &JoinType::Full)?; let columns = columns(&join.schema()); - assert_eq!(columns, vec!["a1", "b1", "c1", "a2", "c2"]); + assert_eq!(columns, vec!["a1", "b1", "c1", "a2", "b2", "c2"]); let stream = join.execute(0).await?; let batches = common::collect(stream).await?; let expected = vec![ - "+----+----+----+----+----+", - "| a1 | b1 | c1 | a2 | c2 |", - "+----+----+----+----+----+", - "| | | | 30 | 90 |", - "| 1 | 4 | 7 | 10 | 70 |", - "| 2 | 5 | 8 | 20 | 80 |", - "| 3 | 7 | 9 | | |", - "+----+----+----+----+----+", + "+----+----+----+----+----+----+", Review comment: I see -- the output was only showing `b1` from `left` -- that was very confusing. Thank you for making it clearer ########## File path: datafusion/tests/sql.rs ########## @@ -1342,6 +1342,11 @@ async fn outer_join() -> Result<()> { vec!["44", "d", "x"], ]; assert_eq!(expected, actual); + + let sql = "SELECT t1_id, t1_name, t2_name FROM t1 FULL OUTER JOIN t2 ON t1_id = t2_id ORDER BY t1_id"; Review comment: 👍 -- 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: us...@infra.apache.org