This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 9923aa5bf72 [fix](Nereids): fix wrong case in 
TransposeSemiJoinLogicalJoinProject (#30874) (#30885)
9923aa5bf72 is described below

commit 9923aa5bf723923edfc11ed9be64d60d57f52048
Author: jakevin <[email protected]>
AuthorDate: Tue Feb 6 13:38:23 2024 +0800

    [fix](Nereids): fix wrong case in TransposeSemiJoinLogicalJoinProject 
(#30874) (#30885)
    
    (cherry picked from commit f8ab1d6dac9d425eb7bb3441c7184b987862e8d0) 
(#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 af2bdc1349a..8408c23d50c 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]

Reply via email to