rdblue commented on code in PR #6717: URL: https://github.com/apache/iceberg/pull/6717#discussion_r1101943185
########## spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java: ########## @@ -722,6 +741,9 @@ private Table loadFromPathIdentifier(PathIdentifier ident) { long snapshotIdAsOfTime = SnapshotUtil.snapshotIdAsOfTime(table, asOfTimestamp); return new SparkTable(table, snapshotIdAsOfTime, !cacheEnabled); + } else if (branch != null && table.snapshot(branch) != null) { + return new SparkTable(table, table.snapshot(branch).snapshotId(), !cacheEnabled); Review Comment: If the branch is non-null but the table doesn't have a branch with that name, then I think this must fail rather than returning the `else` branch, right? -- 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