SourabhBadhya commented on code in PR #4520: URL: https://github.com/apache/hive/pull/4520#discussion_r1293102619
########## ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java: ########## @@ -1039,7 +1039,7 @@ public static List<String> mergeUniqElems(List<String> src, List<String> dest) { return src; } - private static final String tmpPrefix = "_tmp."; + private static final String tmpPrefix = "-tmp."; private static final String taskTmpPrefix = "_task_tmp."; Review Comment: > Duplicated records might happen if the merge task reads all output files under "-tmp" @dengzhhu653 There is deletion happening before finalising the list of files, which removes any unnecessary files present in "-tmp". Please refer here - https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java#L1473-L1474 I have also added a test case which involves doing CTAS operation with a union select operation. ########## ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java: ########## @@ -1039,7 +1039,7 @@ public static List<String> mergeUniqElems(List<String> src, List<String> dest) { return src; } - private static final String tmpPrefix = "_tmp."; + private static final String tmpPrefix = "-tmp."; private static final String taskTmpPrefix = "_task_tmp."; Review Comment: > Duplicated records might happen if the merge task reads all output files under "-tmp" @dengzhhu653 There is deletion happening before finalising the list of files, which removes any unnecessary files present in "-tmp". Please refer here - https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java#L1473-L1474 I have also added a test case which involves doing CTAS operation with a union select operation. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org