You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/15 13:57:59 UTC

[GitHub] [hive] okumin commented on a change in pull request #1873: HIVE-24606: Multi-stage materialized CTEs can lose intermediate data

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org