You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/08/05 08:02:03 UTC

[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #6380: [BUG] Fixed BE crash when select stmt and on-clause does not contain the Slot of the Union Node on the build side of Join

EmmyMiao87 commented on a change in pull request #6380:
URL: https://github.com/apache/incubator-doris/pull/6380#discussion_r683222613



##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
##########
@@ -1838,6 +1837,11 @@ public PlanNode createJoinNode(Analyzer analyzer, PlanNode outer, PlanNode inner
      */
     private PlanNode createJoinNode(Analyzer analyzer, PlanNode outer, TableRef innerRef,
                                     SelectStmt selectStmt) throws UserException {
+	// Before creating a build node, ensure that all required slots are materialized,
+        // even if slots that are not needed by Statement outside.
+        // Otherwise, when select stmt and on-clause does not contain the Slot of the Union Node on the right side of Join,
+        // it will cause an error, see Doris-6380.
+	materializeTableResultForCrossJoinOrCountStar(innerRef, analyzer);

Review comment:
       Changing the order is not a good way




-- 
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-unsubscribe@doris.apache.org

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



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