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

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


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 78ab9f7100c branch-4.1: [fix](subquery) eliminate null aware by 
mistake #64639 (#64716)
78ab9f7100c is described below

commit 78ab9f7100ced5108457696a041dd9a71d2daa33
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jun 23 16:38:20 2026 +0800

    branch-4.1: [fix](subquery) eliminate null aware by mistake #64639 (#64716)
    
    Cherry-picked from #64639
    
    Co-authored-by: morrySnow <[email protected]>
---
 .../nereids/rules/analysis/SubqueryToApply.java    | 25 ++++++++--------------
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubqueryToApply.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubqueryToApply.java
index d98d1dfcd1d..8e05e6e3926 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubqueryToApply.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/SubqueryToApply.java
@@ -118,22 +118,15 @@ public class SubqueryToApply implements 
AnalysisRuleFactory {
                                 ctx.statementContext, 
shouldOutputMarkJoinSlot.get(i));
                         SubqueryContext context = new 
SubqueryContext(subqueryExprs);
                         Expression conjunct = 
replaceSubquery.replace(oldConjuncts.get(i), context);
-                        /*
-                        * the idea is replacing each mark join slot with null 
and false literal
-                        * then run FoldConstant rule, if the evaluate result 
are:
-                        * 1. all true
-                        * 2. all null and false (in logicalFilter, we discard 
both null and false values)
-                        * the mark slot can be non-nullable boolean
-                        * we pass this info to LogicalApply. And in 
InApplyToJoin rule
-                        * if it's semi join with non-null mark slot
-                        * we can safely change the mark conjunct to hash 
conjunct
-                        */
-                        ExpressionRewriteContext rewriteContext = new 
ExpressionRewriteContext(ctx.cascadesContext);
-                        boolean isMarkSlotNotNull = 
conjunct.containsType(MarkJoinSlotReference.class)
-                                        ? 
ExpressionUtils.canInferNotNullForMarkSlot(
-                                                
TrySimplifyPredicateWithMarkJoinSlot.INSTANCE.rewrite(conjunct,
-                                                        rewriteContext), 
rewriteContext)
-                                        : false;
+                        // TODO: The way to optimize null aware mark join is 
not right.
+                        //   remove it temporary until we refactor it.
+                        // ExpressionRewriteContext rewriteContext = new 
ExpressionRewriteContext(ctx.cascadesContext);
+                        // boolean isMarkSlotNotNull = 
conjunct.containsType(MarkJoinSlotReference.class)
+                        //                 ? 
ExpressionUtils.canInferNotNullForMarkSlot(
+                        //                         
TrySimplifyPredicateWithMarkJoinSlot.INSTANCE.rewrite(conjunct,
+                        //                                 rewriteContext), 
rewriteContext)
+                        //                 : false;
+                        boolean isMarkSlotNotNull = false;
                         Pair<LogicalPlan, Optional<Expression>> result = 
subqueryToApply(subqueryExprs.stream()
                                     .collect(ImmutableList.toImmutableList()), 
tmpPlan,
                                 context.getSubqueryToMarkJoinSlot(),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to