nastra commented on code in PR #12462:
URL: https://github.com/apache/iceberg/pull/12462#discussion_r1981853741


##########
core/src/main/java/org/apache/iceberg/SerializableTable.java:
##########
@@ -178,10 +178,9 @@ public int formatVersion() {
   }
 
   private int formatVersion(Table table) {
-    if (table instanceof HasTableOperations) {
-      HasTableOperations ops = (HasTableOperations) table;
-      return ops.operations().current().formatVersion();
-    } else {
+    try {
+      return TableUtil.formatVersion(table);
+    } catch (IllegalArgumentException e) {

Review Comment:
   note that the try-catch is mainly so that we don't fail during the 
instantiation of `SerializableTable`: 
https://github.com/apache/iceberg/pull/12462/files#diff-46dafb425240806166ccc8f27a6c301781c5082bf1a187291cc92c2a8f17a588R90



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