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



##########
File path: 
flink/src/test/java/org/apache/iceberg/flink/TestFlinkCatalogTable.java
##########
@@ -239,6 +241,29 @@ public void testCreatePartitionTable() throws 
TableNotExistException {
     Assert.assertEquals(Collections.singletonList("dt"), 
catalogTable.getPartitionKeys());
   }
 
+  @Test
+  public void testCreateTableWithFormatV2ThroughTableProperty() throws 
Exception {
+    sql("CREATE TABLE tl(id BIGINT) WITH ('format-version'='2')");
+
+    Table table = table("tl");
+    Assert.assertEquals("should create table using format v2",
+        2, ((BaseTable) table).operations().current().formatVersion());
+  }
+
+  @Test
+  public void testUpgradeTableWithFormatV2ThroughTableProperty() throws 
Exception {

Review comment:
       It would be nice to have a test that validates you can't downgrade a 
table using the table property.




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