stevenzwu commented on code in PR #4744:
URL: https://github.com/apache/iceberg/pull/4744#discussion_r878585592
##########
core/src/main/java/org/apache/iceberg/BaseIncrementalAppendScan.java:
##########
@@ -53,14 +53,7 @@ public IncrementalAppendScan fromSnapshotInclusive(long
fromSnapshotId) {
Snapshot startingSnapshotInclusive = table().snapshot(fromSnapshotId);
Preconditions.checkArgument(startingSnapshotInclusive != null,
"Cannot find the starting snapshot: %d", fromSnapshotId);
- // To achieve inclusive behavior, we pass the parent snapshot id to the
TableScanContext.
- // If parent id is null, leave the TableScanContext#fromSnapshotId as null.
- // This way, TableScanContext#fromSnapshotId always capture the exclusive
behavior.
- if (startingSnapshotInclusive.parentId() != null) {
- return newRefinedScan(tableOps(), table(), schema(),
- context().fromSnapshotId(startingSnapshotInclusive.parentId()));
- }
- return this;
+ return newRefinedScan(tableOps(), table(), schema(),
context().fromSnapshotIdInclusive(fromSnapshotId));
Review Comment:
this was a bug that was caught when adding a new test coverage
--
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]