aokolnychyi commented on a change in pull request #2398:
URL: https://github.com/apache/iceberg/pull/2398#discussion_r605308464



##########
File path: core/src/main/java/org/apache/iceberg/BaseMetadataTable.java
##########
@@ -34,11 +34,34 @@
  * using a {@link StaticTableOperations}. This way no Catalog related calls 
are needed when reading the table data after
  * deserialization.
  */
-abstract class BaseMetadataTable implements Table, Serializable {
+abstract class BaseMetadataTable implements Table, HasTableOperations, 
Serializable {
   private final PartitionSpec spec = PartitionSpec.unpartitioned();
   private final SortOrder sortOrder = SortOrder.unsorted();
+  private final TableOperations ops;
+  private final Table table;
+  private final String name;
 
-  abstract Table table();
+  protected BaseMetadataTable(TableOperations ops, Table table, String name) {
+    this.ops = ops;
+    this.table = table;
+    this.name = name;
+  }
+
+  abstract MetadataTableType metadataTableType();
+
+  protected Table table() {
+    return table;
+  }
+
+  @Override
+  public TableOperations operations() {

Review comment:
       Here we are exposing whatever ops we get in the metadata table. You are 
right it is currently the same table ops as in the base table. I think that was 
done intentionally to keep metadata tables in sync. However, we cannot 
guarantee this won't change in the future. In `BaseMetadataTable`, we don't 
really know what ops we got.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to