pvargacl commented on a change in pull request #1971:
URL: https://github.com/apache/hive/pull/1971#discussion_r581010173
##########
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) {
+ newFileStatuses.add(srcFs.getFileStatus(filePath));
+ }
+ } else {
+ newFileStatuses = listFilesCreatedByQuery(loadPath, writeId,
stmtId);
+
newFiles.addAll(newFileStatuses.stream().map(FileStatus::getPath).collect(Collectors.toList()));
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]