mingmwang opened a new issue, #4363:
URL: https://github.com/apache/arrow-datafusion/issues/4363

   **Describe the bug**
   A clear and concise description of what the bug is.
   
   ````
   CREATE TEMPORARY TABLE t1 (t1_id INT,t1_name String);
   CREATE TEMPORARY TABLE t2 (t2_id INT,t2_name String);
   
   insert into t1 values (11, "a"), (22, "b"), (33, "c"), (44, "d");
   insert into t2 values (11, "z"), (22, "y"), (44, "x"), (55, "w");
   
   SELECT t1_id, t1_name, t2_name FROM t1 LEFT JOIN t2 ON (t1_id != t2_id and 
t2_id >= 100) ORDER BY t1_id;
   
   ````
   
   SparkSQL result:
   
               "+-------+---------+---------+",
               "| t1_id | t1_name | t2_name |",
               "+-------+---------+---------+",
               "| 11    | a       |         |",
               "| 22    | b       |         |",
               "| 33    | c       |         |",
               "| 44    | d       |         |",
               "+-------+---------+---------+",
   
   DataFusion UT
   
   ````
   async fn error_cross_join() {
       let test_repartition_joins = vec![true, false];
       for repartition_joins in test_repartition_joins {
           let ctx = create_join_context("t1_id", "t2_id", 
repartition_joins).unwrap();
   
           let sql = "SELECT t1_id, t1_name, t2_name FROM t1 LEFT JOIN t2 ON 
(t1_id != t2_id and t2_id >= 100) ORDER BY t1_id";
           let actual = execute_to_batches(&ctx, sql).await;
           let expected = vec![
               "+-------+---------+---------+",
               "| t1_id | t1_name | t2_name |",
               "+-------+---------+---------+",
               "| 11    | a       |         |",
               "| 22    | b       |         |",
               "| 33    | c       |         |",
               "| 44    | d       |         |",
               "+-------+---------+---------+",
           ];
   
           assert_batches_eq!(expected, &actual);
       }
   }
   
   actual:
   
   [
       "++",
       "++",
   ]
   
   ````
   **To Reproduce**
   Steps to reproduce the behavior:
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Additional context**
   Add any other context about the problem here.
   


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