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 8b1e0e9 commit 74922fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datafusion/core/src/dataframe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2987,7 +2987,7 @@ mod tests {
JoinType::Inner,
Some(Expr::Literal(ScalarValue::Null)),
)?;
let expected_plan = "Inner Join: \
let expected_plan = "Cross Join: \
\n TableScan: a projection=[c1], full_filters=[Boolean(NULL)]\
\n TableScan: b projection=[c1]";
assert_eq!(expected_plan, format!("{}", join.into_optimized_plan()?));
Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,13 +949,13 @@ impl LogicalPlanBuilder {
/// Apply a cross join
pub fn cross_join(self, right: LogicalPlan) -> Result<Self> {
let join_schema =
build_join_schema(self.plan.schema(), right.schema(), &JoinType::Full)?;
build_join_schema(self.plan.schema(), right.schema(), &JoinType::Inner)?;
Ok(Self::new(LogicalPlan::Join(Join {
left: self.plan,
right: Arc::new(right),
on: vec![],
filter: None,
join_type: JoinType::Full,
join_type: JoinType::Inner,
join_constraint: JoinConstraint::On,
null_equals_null: false,
schema: DFSchemaRef::new(join_schema),
Expand Down
4 changes: 2 additions & 2 deletions datafusion/optimizer/src/push_down_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,7 @@ mod tests {
.build()?;

let expected = "Projection: test.a, test1.d\
\n Inner Join: \
\n Cross Join: \
\n Projection: test.a, test.b, test.c\
\n TableScan: test, full_filters=[test.a = Int32(1)]\
\n Projection: test1.d, test1.e, test1.f\
Expand All @@ -1754,7 +1754,7 @@ mod tests {
.build()?;

let expected = "Projection: test.a, test1.a\
\n Inner Join: \
\n Cross Join: \
\n Projection: test.a, test.b, test.c\
\n TableScan: test, full_filters=[test.a = Int32(1)]\
\n Projection: test1.a, test1.b, test1.c\
Expand Down

0 comments on commit 74922fb

Please sign in to comment.