Skip to content

Commit

Permalink
[fix](Nereids) join order is not right after sql parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
morrySnow committed Dec 20, 2023
1 parent 9d5b9cc commit a4b5976
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2808,7 +2808,7 @@ private LogicalPlan withRelations(LogicalPlan inputPlan, List<RelationContext> r
LogicalPlan left = inputPlan;
for (RelationContext relation : relations) {
// build left deep join tree
LogicalPlan right = visitRelation(relation);
LogicalPlan right = withJoinRelations(visitRelation(relation), relation);
left = (left == null) ? right :
new LogicalJoin<>(
JoinType.CROSS_JOIN,
Expand All @@ -2818,7 +2818,6 @@ private LogicalPlan withRelations(LogicalPlan inputPlan, List<RelationContext> r
Optional.empty(),
left,
right);
left = withJoinRelations(left, relation);
// TODO: pivot and lateral view
}
return left;
Expand Down

0 comments on commit a4b5976

Please sign in to comment.