alamb commented on code in PR #4219:
URL: https://github.com/apache/arrow-datafusion/pull/4219#discussion_r1030767000
##########
datafusion/core/tests/sql/joins.rs:
##########
@@ -1870,3 +1870,125 @@ async fn reduce_full_join_to_inner_join() -> Result<()>
{
Ok(())
}
+
+#[tokio::test]
+async fn sort_merge_equijoin() -> Result<()> {
+ let ctx = create_sort_merge_join_context("t1_id", "t2_id")?;
+ let equivalent_sql = [
+ "SELECT t1_id, t1_name, t2_name FROM t1 JOIN t2 ON t1_id = t2_id ORDER
BY t1_id",
+ "SELECT t1_id, t1_name, t2_name FROM t1 JOIN t2 ON t2_id = t1_id ORDER
BY t1_id",
+ ];
+ let expected = vec![
+ "+-------+---------+---------+",
+ "| t1_id | t1_name | t2_name |",
+ "+-------+---------+---------+",
+ "| 11 | a | z |",
+ "| 22 | b | y |",
+ "| 44 | d | x |",
+ "+-------+---------+---------+",
+ ];
+ for sql in equivalent_sql.iter() {
+ let actual = execute_to_batches(&ctx, sql).await;
+ assert_batches_eq!(expected, &actual);
+ }
+
+ Ok(())
+}
+
+#[tokio::test]
+async fn sort_merge_join_on_date32() -> Result<()> {
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]