This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 9d0ca2f5ef342889ef54be905c000a53179ceffd Author: jakevin <[email protected]> AuthorDate: Tue Feb 6 11:18:21 2024 +0800 [fix](Nereids): fix wrong case in TransposeSemiJoinLogicalJoinProject (#30874) --- .../rules/rewrite/TransposeSemiJoinLogicalJoinProject.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java index 37b3e027ff7..783dca5f9dc 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/TransposeSemiJoinLogicalJoinProject.java @@ -76,7 +76,11 @@ public class TransposeSemiJoinLogicalJoinProject extends OneRewriteRuleFactory { * A B A C */ // RIGHT_OUTER_JOIN should be eliminated in rewrite phase - Preconditions.checkState(bottomJoin.getJoinType() != JoinType.RIGHT_OUTER_JOIN); + // TODO: when top join is ANTI JOIN, bottomJoin may be RIGHT_OUTER_JOIN + // Can we also do the transformation? + if (bottomJoin.getJoinType() == JoinType.RIGHT_OUTER_JOIN) { + return null; + } Plan newBottomSemiJoin = topSemiJoin.withChildren(a, c); Plan newTopJoin = bottomJoin.withChildren(newBottomSemiJoin, b); @@ -92,7 +96,11 @@ public class TransposeSemiJoinLogicalJoinProject extends OneRewriteRuleFactory { * A B B C */ // LEFT_OUTER_JOIN should be eliminated in rewrite phase - Preconditions.checkState(bottomJoin.getJoinType() != JoinType.LEFT_OUTER_JOIN); + // TODO: when top join is ANTI JOIN, bottomJoin may be RIGHT_OUTER_JOIN + // Can we also do the transformation? + if (bottomJoin.getJoinType() == JoinType.LEFT_OUTER_JOIN) { + return null; + } Plan newBottomSemiJoin = topSemiJoin.withChildren(b, c); Plan newTopJoin = bottomJoin.withChildren(a, newBottomSemiJoin); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
