pvary commented on a change in pull request #2715:
URL: https://github.com/apache/hive/pull/2715#discussion_r727303777
##########
File path:
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java
##########
@@ -721,6 +721,29 @@ public void testCreateTableWithoutColumnComments() {
}
}
+ @Test
+ public void testCreatePartitionedTableWithColumnComments() {
+ TableIdentifier identifier = TableIdentifier.of("default",
"partitioned_with_comment_table");
+ shell.executeStatement("CREATE EXTERNAL TABLE
partitioned_with_comment_table (" +
+ "t_int INT COMMENT 'int column', " +
+ "t_string STRING COMMENT 'string column', " +
+ "t_string_2 STRING) " +
+ "PARTITIONED BY (t_string_3 STRING COMMENT 'partition column') " +
+ "STORED BY ICEBERG " +
+ testTables.locationForCreateTableSQL(identifier) +
+ testTables.propertiesForCreateTableSQL(ImmutableMap.of()));
+ org.apache.iceberg.Table icebergTable = testTables.loadTable(identifier);
+
+ List<Object[]> rows = shell.executeStatement("DESCRIBE
default.partitioned_with_comment_table");
+ // The partition transform information is 3 extra lines, and 1 more line
for the columns
+ Assert.assertEquals(icebergTable.schema().columns().size() + 4,
rows.size());
+ for (int i = 0; i < icebergTable.schema().columns().size(); i++) {
+ Types.NestedField field = icebergTable.schema().columns().get(i);
Review comment:
Done
--
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]