yujun777 commented on code in PR #54953:
URL: https://github.com/apache/doris/pull/54953#discussion_r2305987395


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AdjustNullable.java:
##########
@@ -154,13 +154,22 @@ public Plan visitLogicalGenerate(LogicalGenerate<? 
extends Plan> generate, Map<E
     @Override
     public Plan visitLogicalJoin(LogicalJoin<? extends Plan, ? extends Plan> 
join, Map<ExprId, Slot> replaceMap) {
         join = (LogicalJoin<? extends Plan, ? extends Plan>) super.visit(join, 
replaceMap);
-        Optional<List<Expression>> hashConjuncts = 
updateExpressions(join.getHashJoinConjuncts(), replaceMap, true);
+        return doVisitLogicalJoin(join, replaceMap, isAnalyzedPhase, 
!isAnalyzedPhase);
+    }
+
+    /**
+     * Adjust join nullable attribute of slot reference in expression.
+     */
+    public static LogicalJoin<? extends Plan, ? extends Plan> 
doVisitLogicalJoin(
+            LogicalJoin<? extends Plan, ? extends Plan> join,
+            Map<ExprId, Slot> replaceMap, boolean isAnalyzedPhase, boolean 
check) {
+        Optional<List<Expression>> hashConjuncts = 
doUpdateExpressions(join.getHashJoinConjuncts(), replaceMap, check);
         Optional<List<Expression>> markConjuncts = Optional.empty();
         boolean hadUpdatedMarkConjuncts = false;
         if (isAnalyzedPhase || join.getHashJoinConjuncts().isEmpty()) {
             // if hashConjuncts is empty, mark join conjuncts may use to build 
hash table
             // so need call updateExpressions for mark join conjuncts before 
adjust nullable by output slot
-            markConjuncts = updateExpressions(join.getMarkJoinConjuncts(), 
replaceMap, true);
+            markConjuncts = doUpdateExpressions(join.getMarkJoinConjuncts(), 
replaceMap, check);

Review Comment:
   check => true



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to