nastra commented on code in PR #11585: URL: https://github.com/apache/iceberg/pull/11585#discussion_r1848602800
########## core/src/main/java/org/apache/iceberg/SerializableTable.java: ########## @@ -400,7 +400,14 @@ public Transaction newTransaction() { @Override public StaticTableOperations operations() { - return (StaticTableOperations) ((BaseTable) lazyTable()).operations(); + if (lazyTable() instanceof BaseTable) { + BaseTable table = (BaseTable) lazyTable(); + return (StaticTableOperations) table.operations(); + } else if (lazyTable() instanceof BaseMetadataTable) { + BaseMetadataTable table = (BaseMetadataTable) lazyTable(); + return (StaticTableOperations) table.table().operations(); + } + return null; Review Comment: actually we shouldn't be running into the `null` case. I've updated the code to reflect that -- 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