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


##########
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:
   default value for metadata is false for reader, and true for writer. So, we 
should use the reader side default here. 



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to