This is an automated email from the ASF dual-hosted git repository. jakevin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new f8ab1d6dac9 [fix](Nereids): fix wrong case in TransposeSemiJoinLogicalJoinProject (#30874) f8ab1d6dac9 is described below commit f8ab1d6dac9d425eb7bb3441c7184b987862e8d0 Author: jakevin <jakevin...@gmail.com> 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: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org