okumin commented on a change in pull request #1873:
URL: https://github.com/apache/hive/pull/1873#discussion_r558323016



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -1343,7 +1344,9 @@ private void addCTEAsSubQuery(QB qb, String cteName, 
String cteAlias)
   @Override
   public List<Task<?>> getAllRootTasks() {
     if (!rootTasksResolved) {
-      rootTasks = toRealRootTasks(rootClause.asExecutionOrder());
+      List<CTEClause> execution = rootClause.asExecutionOrder();
+      linkRealDependencies(execution);
+      rootTasks = toRealRootTasks(execution);

Review comment:
       Separated mutating tasks and picking up real roots to avoid complexity.




----------------------------------------------------------------
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.

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