yyanyy commented on a change in pull request #2398:
URL: https://github.com/apache/iceberg/pull/2398#discussion_r605288411
##########
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:
I guess instead of exposing the metadata table's operation, here we are
actually exposing the original base table's operations, wondering if it's worth
adding a comment to explain
##########
File path: core/src/main/java/org/apache/iceberg/BaseMetadataTable.java
##########
@@ -195,12 +218,9 @@ public String toString() {
return name();
}
- abstract String metadataLocation();
Review comment:
Is the plan to use `operations()` on metadata tables to derive metadata
location? wondering if we want to keep this method for backward
compatibility/avoid breaking consumer
--
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]