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

[GitHub] [iceberg] aokolnychyi commented on a diff in pull request #6965: Spark 3.3: Support write to branch through table identifier

aokolnychyi commented on code in PR #6965:
URL: https://github.com/apache/iceberg/pull/6965#discussion_r1124883612


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -659,10 +659,7 @@ private Table load(Identifier ident) {
 
       Matcher branch = BRANCH.matcher(ident.name());
       if (branch.matches()) {
-        Snapshot branchSnapshot = table.snapshot(branch.group(1));
-        if (branchSnapshot != null) {
-          return new SparkTable(table, branchSnapshot.snapshotId(), !cacheEnabled);
-        }
+        return new SparkTable(table, branch.group(1), !cacheEnabled);

Review Comment:
   I think we should use the same in reads and writes. Otherwise, it is confusing.



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