openinx commented on a change in pull request #2887:
URL: https://github.com/apache/iceberg/pull/2887#discussion_r679780479
##########
File path: core/src/test/java/org/apache/iceberg/TestTableMetadata.java
##########
@@ -756,4 +756,54 @@ public void testUpdateSchema() {
Assert.assertEquals("Should return expected last column id",
6, threeSchemaTable.lastColumnId());
}
+
+ @Test
+ public void testCreateV2MetadataThroughTableProperty() {
Review comment:
> It is a bit hard to test this in unit test because format version is
not publicly accessible. I have tested with Spark on EMR and manually verified
that the metadata file shows the correct version.
I think we could access the format version by using the following code:
```java
Table table = ...
TableOperations ops = ((BaseTable) table).operations();
TableMetadata meta = ops.current();
int formatVersion = meta.formatVersion();
```
--
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]