wooyeong commented on code in PR #9455:
URL: https://github.com/apache/iceberg/pull/9455#discussion_r1476145477


##########
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;
-    ValidationException.check(
-        branch == null
-            || SnapshotRef.MAIN_BRANCH.equals(branch)
-            || icebergTable.snapshot(branch) != null,
-        "Cannot use branch (does not exist): %s",
-        branch);
+    if (SnapshotRef.MAIN_BRANCH.equals(branch)) {

Review Comment:
   If `branch` is main, I think we don't need to set `this.branch` as it's 
logically same as invoking `SparkTable(Table, boolean)`. However, some WAP 
tests require this.branch to be set for main.



-- 
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

Reply via email to