amogh-jahagirdar commented on code in PR #11967:
URL: https://github.com/apache/iceberg/pull/11967#discussion_r1918817601
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java:
##########
@@ -561,14 +561,11 @@ public Scan buildChangelogScan() {
boolean emptyScan = false;
if (startTimestamp != null) {
- if (table.currentSnapshot() != null
- && table.currentSnapshot().timestampMillis() < startTimestamp) {
+ if (table.currentSnapshot() == null
+ || startTimestamp > table.currentSnapshot().timestampMillis()) {
emptyScan = true;
}
startSnapshotId = getStartSnapshotId(startTimestamp);
- if (startSnapshotId == null && endTimestamp == null) {
- emptyScan = true;
- }
}
if (endTimestamp != null) {
Review Comment:
I think @lliangyu-lin is right, the current approach should address the
original issue where both start/end snapshot are null, and we have added test
coverage for those cases.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]