szehon-ho commented on code in PR #5063:
URL: https://github.com/apache/iceberg/pull/5063#discussion_r925103298
##########
spark/v3.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMetadataTables.java:
##########
@@ -319,6 +323,89 @@ public void testAllFilesPartitioned() throws Exception {
TestHelpers.assertEqualsSafe(filesTableSchema.asStruct(), expectedFiles,
actualFiles);
}
+ @Test
+ public void testMetadataLogMetatable() throws Exception {
+ // Create table and insert data
+ sql("CREATE TABLE %s (id bigint, data string) " +
+ "USING iceberg " +
+ "PARTITIONED BY (data) " +
+ "TBLPROPERTIES " +
+ "('format-version'='2')", tableName);
Review Comment:
nit, no need for format-version =2?
##########
spark/v3.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMetadataTables.java:
##########
@@ -319,6 +323,89 @@ public void testAllFilesPartitioned() throws Exception {
TestHelpers.assertEqualsSafe(filesTableSchema.asStruct(), expectedFiles,
actualFiles);
}
+ @Test
+ public void testMetadataLogMetatable() throws Exception {
Review Comment:
Nit, can we also add test to Spark 3.3, not vital to this change but may be
nice if future development will be there.
##########
spark/v3.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMetadataTables.java:
##########
@@ -319,6 +323,89 @@ public void testAllFilesPartitioned() throws Exception {
TestHelpers.assertEqualsSafe(filesTableSchema.asStruct(), expectedFiles,
actualFiles);
}
+ @Test
+ public void testMetadataLogMetatable() throws Exception {
Review Comment:
optional: metaTable seems a bit redundant, given the test name
##########
core/src/main/java/org/apache/iceberg/MetadataTableUtils.java:
##########
@@ -64,6 +64,8 @@ private static Table
createMetadataTableInstance(TableOperations ops, Table base
return new HistoryTable(ops, baseTable, metadataTableName);
case SNAPSHOTS:
return new SnapshotsTable(ops, baseTable, metadataTableName);
+ case METADATA_LOG:
Review Comment:
Nit: should we put 's', ie METADATA_LOGS to be consistent?
--
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]