sapienza88 commented on code in PR #768:
URL: https://github.com/apache/incubator-xtable/pull/768#discussion_r2705871589
##########
xtable-core/src/main/java/org/apache/xtable/parquet/ParquetConversionSource.java:
##########
@@ -149,87 +148,114 @@ public CommitsBacklog<Long>
getCommitsBacklog(InstantsForIncrementalSync syncIns
@Override
public TableChange getTableChangeForCommit(Long modificationTime) {
- Stream<LocatedFileStatus> parquetFiles = getParquetFiles(hadoopConf,
basePath);
Set<InternalDataFile> addedInternalDataFiles = new HashSet<>();
- List<FileStatus> tableChangesAfter =
- parquetFiles
- .filter(fileStatus -> fileStatus.getModificationTime() >
modificationTime)
- .collect(Collectors.toList());
- InternalTable internalTable = getMostRecentTable(parquetFiles);
- for (FileStatus tableStatus : tableChangesAfter) {
- InternalDataFile currentDataFile =
createInternalDataFileFromParquetFile(tableStatus);
+ List<ParquetFileConfig> filesMetadata =
+ parquetDataManagerExtractor.getParquetFilesMetadataAfterTime(
+ hadoopConf,
+ parquetDataManagerExtractor.getParquetFiles(hadoopConf, basePath),
Review Comment:
unless the listing function returns a List<LocatedFileStatus> instead of a
Stream<LocatedFileStatus>, those many calls are required or else the stream
"closes"
--
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]