pvargacl commented on a change in pull request #1971:
URL: https://github.com/apache/hive/pull/1971#discussion_r581010868



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -2362,10 +2362,17 @@ private Partition loadPartitionInternal(Path loadPath, 
Table tbl, Map<String, St
               + ", Direct insert = " + isDirectInsert + ")");
         }
         if (newFiles != null) {
-          newFileStatuses = listFilesCreatedByQuery(loadPath, writeId, stmtId);
-          newFiles.addAll(newFileStatuses.stream()
-              .map(FileStatus::getPath)
-              .collect(Collectors.toList()));
+          if (!newFiles.isEmpty()) {
+            // We already know the file list from the direct insert 
manifestfile
+            FileSystem srcFs = loadPath.getFileSystem(conf);
+            newFileStatuses = new ArrayList<>();
+            for (Path filePath : newFiles) {

Review comment:
       getFileStatus throws IOException, and I do not want to wrap ip

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
##########
@@ -4533,6 +4537,12 @@ public static void handleDirectInsertTableFinalPath(Path 
specPath, String unionS
           if (!committed.add(path)) {
             throw new HiveException(nextFile + " was specified in multiple 
manifests");
           }
+          for (Map.Entry<String, List<Path>> dynpath : 
dynamicPartitionSpecs.entrySet()){

Review comment:
       done

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/plan/FileSinkDesc.java
##########
@@ -106,7 +108,7 @@
 
   private Set<FileStatus> filesToFetch = null;
 
-  private Set<String> dynPartitionValues = new HashSet<>();
+  private Map<String, List<Path>> dynPartitionValues = new HashMap<>();

Review comment:
       done




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