RussellSpitzer commented on a change in pull request #1342:
URL: https://github.com/apache/iceberg/pull/1342#discussion_r470857411



##########
File path: core/src/test/java/org/apache/iceberg/hadoop/TestStaticTable.java
##########
@@ -0,0 +1,79 @@
+package org.apache.iceberg.hadoop;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+import org.apache.iceberg.HasTableOperations;
+import org.apache.iceberg.MetadataTableType;
+import org.apache.iceberg.StaticTableOperations;
+import org.apache.iceberg.Table;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestStaticTable extends HadoopTableTestBase {
+
+  private Table getStaticTable() {
+    return TABLES.load(((HasTableOperations) 
table).operations().current().metadataFileLocation());
+  }
+
+  private Table getStaticTable(MetadataTableType type) {
+    return TABLES.load(((HasTableOperations) 
table).operations().current().metadataFileLocation() + "#" + type);
+  }
+
+  @Test
+  public void testLoadFromMetadata() {
+    Table staticTable = getStaticTable();
+    Assert.assertTrue("Loading a metadata file based table should return 
StaticTableOperations",
+        ((HasTableOperations) staticTable).operations() instanceof 
StaticTableOperations);
+  }
+
+  @Test(expected = UnsupportedOperationException.class)
+  public void testCannotBeAddedTo(){
+    Table staticTable = getStaticTable();
+    staticTable.newOverwrite().addFile(FILE_A).commit();
+  }
+
+  @Test(expected = UnsupportedOperationException.class)

Review comment:
       Oh I see there is a custom Iceberg version of it! I get things




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