vinishjail97 commented on code in PR #768:
URL: https://github.com/apache/incubator-xtable/pull/768#discussion_r3365311159
##########
xtable-core/src/main/java/org/apache/xtable/parquet/ParquetConversionSource.java:
##########
@@ -162,14 +182,17 @@ public TableChange getTableChangeForCommit(Long
modificationTime) {
parquetFiles
.filter(fileStatus -> fileStatus.getModificationTime() >
modificationTime)
.collect(Collectors.toList());
- InternalTable internalTable = getMostRecentTable(parquetFiles);
+ InternalTable internalTable =
getMostRecentTable(getParquetFiles(hadoopConf, basePath));
for (FileStatus tableStatus : tableChangesAfter) {
InternalDataFile currentDataFile =
createInternalDataFileFromParquetFile(tableStatus,
internalTable.getReadSchema());
addedInternalDataFiles.add(currentDataFile);
}
return TableChange.builder()
+ .sourceIdentifier(
+ getCommitIdentifier(
+
parquetDataManager.getMostRecentParquetFile().getModificationTime()))
Review Comment:
Confirmed the gap was still present after the fetch-once cleanup —
`tableChangesAfter`/`internalTable` used the materialized snapshot, but
`sourceIdentifier` still called
`parquetDataManager.getMostRecentParquetFile()`, a separate listing. Fixed in
d510e1a9: both the table and the identifier now come from the same
`parquetFiles` snapshot (`getMostRecentParquetFile(parquetFiles.stream())`).
Added an assertion in ITParquetConversionSource that the committed identifier
equals that snapshot's latest modification time. Verified:
ITParquetConversionSource 6/6. Resolving.
--
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]