aajisaka commented on code in PR #9567:
URL: https://github.com/apache/hudi/pull/9567#discussion_r1420258408


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieCopyOnWriteTableInputFormat.java:
##########
@@ -241,31 +246,86 @@ private List<FileStatus> 
listStatusForSnapshotMode(JobConf job,
       boolean shouldIncludePendingCommits =
           HoodieHiveUtils.shouldIncludePendingCommits(job, 
tableMetaClient.getTableConfig().getTableName());
 
-      HiveHoodieTableFileIndex fileIndex =
-          new HiveHoodieTableFileIndex(
-              engineContext,
-              tableMetaClient,
-              props,
-              HoodieTableQueryType.SNAPSHOT,
-              partitionPaths,
-              queryCommitInstant,
-              shouldIncludePendingCommits);
-
-      Map<String, List<FileSlice>> partitionedFileSlices = 
fileIndex.listFileSlices();
-
-      targetFiles.addAll(
-          partitionedFileSlices.values()
-              .stream()
-              .flatMap(Collection::stream)
-              .filter(fileSlice -> checkIfValidFileSlice(fileSlice))
-              .map(fileSlice -> createFileStatusUnchecked(fileSlice, 
fileIndex, tableMetaClient))
-              .collect(Collectors.toList())
-      );
+      if (HoodieTableMetadataUtil.isFilesPartitionAvailable(tableMetaClient) 
|| conf.getBoolean(ENABLE.key(), ENABLE.defaultValue())) {

Review Comment:
   In this case, defaulting to false may lead poor performance and I think 
that's why HUDI-5409 got reverted. Maybe we can create a separate parameter and 
use it?



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

Reply via email to