nastra commented on code in PR #9455: URL: https://github.com/apache/iceberg/pull/9455#discussion_r1475897611
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java: ########## @@ -131,12 +133,12 @@ public SparkTable(Table icebergTable, boolean refreshEagerly) { public SparkTable(Table icebergTable, String branch, boolean refreshEagerly) { this(icebergTable, refreshEagerly); this.branch = branch; + final Snapshot snapshot = icebergTable.snapshot(branch); ValidationException.check( - branch == null - || SnapshotRef.MAIN_BRANCH.equals(branch) - || icebergTable.snapshot(branch) != null, + branch == null || SnapshotRef.MAIN_BRANCH.equals(branch) || snapshot != null, "Cannot use branch (does not exist): %s", branch); + this.snapshotId = snapshot.snapshotId(); Review Comment: it looks like some tests fail with a NPE at exactly this line -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org