Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Dandandan committed Oct 17, 2024
1 parent 5f0803b commit 5b53758
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion datafusion/sql/src/relation/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
.build()
}
}
JoinConstraint::None => not_impl_err!("NONE constraint is not supported"),
JoinConstraint::None => {
LogicalPlanBuilder::from(left)
.join_on(right, join_type, [])?
.build()
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/sql/tests/cases/plan_to_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ fn roundtrip_crossjoin() -> Result<()> {
.unwrap();

let expected = "Projection: j1.j1_id, j2.j2_string\
\n Inner Join: Filter: Boolean(true)\
\n Cross Join: \
\n TableScan: j1\
\n TableScan: j2";

Expand Down
6 changes: 3 additions & 3 deletions datafusion/sql/tests/sql_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3154,7 +3154,7 @@ fn lateral_comma_join_referencing_join_rhs() {
\n j1 JOIN (j2 JOIN j3 ON(j2_id = j3_id - 2)) ON(j1_id = j2_id),\
\n LATERAL (SELECT * FROM j3 WHERE j3_string = j2_string) as j4;";
let expected = "Projection: *\
\n Cross Join:\
\n Cross Join: \
\n Inner Join: Filter: j1.j1_id = j2.j2_id\
\n TableScan: j1\
\n Inner Join: Filter: j2.j2_id = j3.j3_id - Int64(2)\
Expand All @@ -3178,12 +3178,12 @@ fn lateral_comma_join_with_shadowing() {
) as j2\
) as j2;";
let expected = "Projection: *\
\n Cross Join:\
\n Cross Join: \
\n TableScan: j1\
\n SubqueryAlias: j2\
\n Subquery:\
\n Projection: *\
\n Cross Join:\
\n Cross Join: \
\n TableScan: j1\
\n SubqueryAlias: j2\
\n Subquery:\
Expand Down

0 comments on commit 5b53758

Please sign in to comment.