rbalamohan commented on a change in pull request #3058:
URL: https://github.com/apache/hive/pull/3058#discussion_r824412526
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
##########
@@ -1496,7 +1499,13 @@ public static void mvFileToFinalPath(Path specPath,
Configuration hconf,
// for CTAS or Create MV statements
perfLogger.perfLogBegin("FileSinkOperator",
"moveSpecifiedFileStatus");
LOG.debug("CTAS/Create MV: Files being renamed: " +
filesKept.toString());
- moveSpecifiedFilesInParallel(hconf, fs, tmpPath, specPath,
filesKept);
+ if (conf.getTable() != null &&
conf.getTable().getTableType().equals(TableType.EXTERNAL_TABLE)) {
+ // Do this optimisation only for External tables.
+ createFileList(filesKept, tmpPath, specPath, fs);
+ } else {
+ List<String> filesKeptPaths = filesKept.stream().map(x ->
x.getPath().toString()).collect(Collectors.toList());
Review comment:
filesKept is a set. Is it possible to retain as "set" after the mapping?
(Something like Collectors.toSet()). if so, no need to change the signature of
moveSpecifiedFilesInParallel?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]