tsreaper commented on code in PR #1735:
URL: https://github.com/apache/incubator-paimon/pull/1735#discussion_r1286581524
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/FileStoreSourceSplitReader.java:
##########
@@ -121,6 +129,13 @@ public void
handleSplitsChanges(SplitsChange<FileStoreSourceSplit> splitsChange)
}
splits.addAll(splitsChange.splits());
+ DataSplit dataSplit = (DataSplit) splits.peek().split();
+ if (sourceReaderMetrics != null
+ && (currentSnapshotId == FileStoreSourceReaderMetrics.UNDEFINED
+ || dataSplit.snapshotId() != currentSnapshotId)) {
+ currentSnapshotId = dataSplit.snapshotId();
Review Comment:
You're now using `DataFileMeta` creation time instead of snapshot creation
time. No need to compare `snapshotId`.
##########
paimon-core/src/main/java/org/apache/paimon/table/source/DataSplit.java:
##########
@@ -75,6 +75,16 @@ public boolean isStreaming() {
return isStreaming;
}
+ public long getLatestFileCreationTime() {
Review Comment:
Just return `Optional<Long>`. Let caller decide how to deal with
`Optional.empty()`.
--
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]