morrySnow commented on code in PR #11569: URL: https://github.com/apache/doris/pull/11569#discussion_r939547384
########## fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java: ########## @@ -211,9 +211,6 @@ public void init(Analyzer analyzer) throws UserException { outputSmap = new ExprSubstitutionMap(); for (int i = 0; i < slotExprs.size(); ++i) { - if (!sortTupleSlots.get(i).isMaterialized()) { Review Comment: add a comment that we rely on projectionPlanner to get a correct plan. ########## fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java: ########## @@ -1031,9 +1031,33 @@ private PlanNode createSelectPlan(SelectStmt selectStmt, Analyzer analyzer, long for (int i = 1; i < selectStmt.getTableRefs().size(); ++i) { TableRef innerRef = selectStmt.getTableRefs().get(i); + boolean aggOutputNotHaveMaterializedSlot = false; + AggregateInfo aggregateInfo = null; + TupleDescriptor output = null; + if (innerRef instanceof InlineViewRef) { + InlineViewRef inlineViewRef = (InlineViewRef) innerRef; + QueryStmt queryStmt = inlineViewRef.getViewStmt(); + if (queryStmt instanceof SelectStmt) { Review Comment: set operation do not has this bug? ########## fe/fe-core/src/main/java/org/apache/doris/analysis/SlotDescriptor.java: ########## @@ -162,6 +162,21 @@ public void setIsMaterialized(boolean value) { isMaterialized = value; } + public void materializeSrcExpr() { + if (sourceExprs == null) { + return; + } + for (Expr expr : sourceExprs) { Review Comment: should we need to do chain replace? such as set `IsMaterialized` on the source expr of source expr's slot -- 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