alamb commented on code in PR #2591:
URL: https://github.com/apache/arrow-datafusion/pull/2591#discussion_r882044961
##########
datafusion/core/tests/sql/joins.rs:
##########
@@ -149,15 +149,88 @@ async fn equijoin_right_and_condition_from_left() ->
Result<()> {
}
#[tokio::test]
-async fn equijoin_and_unsupported_condition() -> Result<()> {
+async fn equijoin_left_and_condition_from_left() -> Result<()> {
let ctx = create_join_context("t1_id", "t2_id")?;
let sql =
- "SELECT t1_id, t1_name, t2_name FROM t1 LEFT JOIN t2 ON t1_id = t2_id
AND t1_id >= '44' ORDER BY t1_id";
- let res = ctx.create_logical_plan(sql);
+ "SELECT t1_id, t1_name, t2_name FROM t1 LEFT JOIN t2 ON t1_id = t2_id
AND t1_id >= 44 ORDER BY t1_id";
+ let expected = vec![
+ "+-------+---------+---------+",
+ "| t1_id | t1_name | t2_name |",
+ "+-------+---------+---------+",
+ "| 11 | a | |",
+ "| 22 | b | |",
+ "| 33 | c | |",
+ "| 44 | d | x |",
+ "+-------+---------+---------+",
+ ];
+ let actual = execute_to_batches(&ctx, sql).await;
+ assert_batches_eq!(expected, &actual);
- assert!(res.is_err());
- assert_eq!(format!("{}", res.unwrap_err()), "This feature is not
implemented: Unsupported expressions in Left JOIN: [#t1_id >= Utf8(\"44\")]");
+ Ok(())
+}
+#[tokio::test]
Review Comment:
these tests look good 👍
##########
datafusion/core/src/optimizer/filter_push_down.rs:
##########
@@ -1334,6 +1337,188 @@ mod tests {
Ok(())
}
+ /// single table predicate parts of ON condition should be pushed to both
inputs
+ #[ignore]
Review Comment:
This test seems to be marked `ignore`
--
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]