Skip to content

Commit f8ad254

Browse files
committed
Always output left side join key for inner join
1 parent f419d2f commit f8ad254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/UnaliasSymbolReferences.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ public PlanNode visitJoin(JoinNode node, RewriteContext<Void> context)
591591
if (node.getType().equals(INNER)) {
592592
canonicalCriteria.stream()
593593
.filter(clause -> clause.getLeft().getType().equals(clause.getRight().getType()) && clause.getLeft().getType().equalValuesAreIdentical())
594-
.filter(clause -> node.getOutputVariables().contains(clause.getLeft()))
594+
.filter(clause -> node.getOutputVariables().contains(clause.getRight()))
595595
.forEach(clause -> map(clause.getRight(), clause.getLeft()));
596596
}
597597

0 commit comments

Comments
 (0)