morrySnow commented on code in PR #12261:
URL: https://github.com/apache/doris/pull/12261#discussion_r961318024


##########
regression-test/suites/tpch_sf1_p1/tpch_sf1/explain/test_q10.groovy:
##########
@@ -61,9 +61,9 @@ suite("test_explain_tpch_sf_1_q10") {
         check {
             explainStr ->
                explainStr.contains("VTOP-N\n" + 
-                               "  |  order by: <slot 24> <slot 23> 
sum(`l_extendedprice` * (1 - `l_discount`)) DESC") && 
+                               "  |  order by: <slot 24> <slot 23> sum(<slot 
53> * (1 - <slot 54>)) DESC") && 

Review Comment:
   we have so many slot lost its SourceExpr, do we have a way to add them back 
to obtain a better explain string?



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AggregateInfo.java:
##########
@@ -523,16 +523,8 @@ public void substitute(ExprSubstitutionMap smap, Analyzer 
analyzer) {
             if (exprList.size() > 1) {
                 continue;
             }
-            Expr expr = exprList.get(0);
-            if (!(expr instanceof SlotRef)) {
-                continue;
-            }
-            SlotRef slotRef = (SlotRef) expr;
-            Expr right = smap.get(slotRef);
-            if (right == null) {
-                continue;
-            }
-            slotDesc.setIsNullable(right.isNullable());
+            Expr srcExpr = exprList.get(0).substitute(smap);

Review Comment:
   do we need to update the comment?



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to