You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "jackye1995 (via GitHub)" <gi...@apache.org> on 2023/04/27 03:40:05 UTC

[GitHub] [iceberg] jackye1995 commented on a diff in pull request #5984: Core, API: Support incremental scanning with branch

jackye1995 commented on code in PR #5984:
URL: https://github.com/apache/iceberg/pull/5984#discussion_r1178591692


##########
core/src/main/java/org/apache/iceberg/BaseIncrementalScan.java:
##########
@@ -34,6 +34,17 @@ protected BaseIncrementalScan(Table table, Schema schema, TableScanContext conte
   protected abstract CloseableIterable<T> doPlanFiles(
       Long fromSnapshotIdExclusive, long toSnapshotIdInclusive);
 
+  @Override
+  public ThisT fromSnapshotInclusive(String ref) {
+    SnapshotRef snapshotRef = table().refs().get(ref);
+    Preconditions.checkArgument(snapshotRef != null, "Cannot find ref %s", ref);
+    Preconditions.checkArgument(snapshotRef.isTag(), "Ref %s is not a tag", ref);
+
+    TableScanContext newContext = context().fromSnapshotIdInclusive(snapshotRef.snapshotId());
+

Review Comment:
   looks like there are some inconsistency in all the usages of newlines in these methods, can we just remove them like `useBranch`?



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org