You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/08 23:33:19 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #3089: Spark: Create metadata tables directly to preserve custom FileIO.

rdblue commented on a change in pull request #3089:
URL: https://github.com/apache/iceberg/pull/3089#discussion_r704844962



##########
File path: core/src/main/java/org/apache/iceberg/MetadataTableUtils.java
##########
@@ -30,11 +30,25 @@ public static boolean hasMetadataTableName(TableIdentifier identifier) {
     return MetadataTableType.from(identifier.name()) != null;
   }
 
+  public static Table createMetadataTableInstance(Table table, MetadataTableType type) {
+    if (table instanceof BaseTable) {
+      TableOperations ops = ((BaseTable) table).operations();
+      return createMetadataTableInstance(ops, table, metadataTableName(table.name(), type), type);
+    } else {
+      throw new IllegalArgumentException(String.format("Cannot create metadata table for table: %s", table));

Review comment:
       Will do.




-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org