gaborkaszab commented on code in PR #17134:
URL: https://github.com/apache/iceberg/pull/17134#discussion_r3569569925


##########
core/src/main/java/org/apache/iceberg/MetadataTableType.java:
##########
@@ -36,7 +39,14 @@ public enum MetadataTableType {
   ALL_FILES,
   ALL_MANIFESTS,
   ALL_ENTRIES,
-  POSITION_DELETES;
+  POSITION_DELETES,
+  METADATA_TABLES;
+
+  private final String lower;

Review Comment:
   I'd leave it to the metadata table code to convert this to lowercase. I'd 
rather remove this and the getter method too



##########
core/src/main/java/org/apache/iceberg/MetadataTables.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg;
+
+import java.util.Arrays;
+import org.apache.iceberg.types.Types;
+
+/** A {@link Table} implementation that exposes a table's metadata tables as 
rows. */
+public class MetadataTables extends BaseMetadataTable {

Review Comment:
   Following the name pattern for other metadata tables, shouldn't this be 
`MetadataTablesTable` ?



##########
core/src/main/java/org/apache/iceberg/MetadataTableType.java:
##########
@@ -45,4 +55,14 @@ public static MetadataTableType from(String name) {
       return null;
     }
   }
+
+  public String tableName() {
+    return this.lower;
+  }
+
+  public static List<String> lowerNames() {

Review Comment:
   I have't found any usage for this in this PR. If I haven't missed anything, 
please remove.



##########
core/src/main/java/org/apache/iceberg/MetadataTableUtils.java:
##########
@@ -88,6 +88,8 @@ private static Table createMetadataTableInstance(
         return new AllEntriesTable(baseTable, metadataTableName);
       case POSITION_DELETES:
         return new PositionDeletesTable(baseTable, metadataTableName);
+      case METADATA_TABLES:

Review Comment:
   Would be nice to have some test coverage too for the whole PR. Leaving the 
comment here to keep track.



-- 
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: [email protected]

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