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 2020/07/22 09:41:09 UTC

[GitHub] [hive] pgaref commented on a change in pull request #1294: HIVE-23891: Using UNION sql clause and speculative execution can cause file duplication in Tez

pgaref commented on a change in pull request #1294:
URL: https://github.com/apache/hive/pull/1294#discussion_r458667959



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
##########
@@ -1459,8 +1459,12 @@ public static void mvFileToFinalPath(Path specPath, Configuration hconf,
       }
 
       // Remove duplicates from tmpPath
-      List<FileStatus> statusList = HiveStatsUtils.getFileStatusRecurse(
-          tmpPath, ((dpCtx == null) ? 1 : dpCtx.getNumDPCols()), fs);
+      int level = dpCtx == null ? 1 : dpCtx.getNumDPCols();
+      // - when execution engine is Tez and the query uses sql clause "Union"
+      //   there is an extra layer of subdirectories that contains the branches of the union;
+      boolean isUnionClauseInTez = conf.getDirName().toString().contains(AbstractFileMergeOperator.UNION_SUDBIR_PREFIX);

Review comment:
       Good catch!




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