nevzheng commented on code in PR #11984:
URL: https://github.com/apache/gravitino/pull/11984#discussion_r3575873472
##########
catalogs/catalog-lakehouse-iceberg/src/test/java/org/apache/gravitino/catalog/lakehouse/iceberg/integration/test/CatalogIcebergBaseIT.java:
##########
@@ -632,6 +632,86 @@ void testTimestampTypeConversion() {
Assertions.assertEquals("col_2_comment",
icebergSchema.columns().get(1).doc());
}
+ @Test
+ void testCreateAndLoadIcebergTableV2Types() {
+ // End-to-end round-trip for the V2 types not otherwise exercised through
a live backend:
+ // boolean, float, double, uuid, fixed, binary, decimal, list and map. The
converter mappings
+ // themselves are unit-tested in TestConvertUtil; this test confirms they
survive create and
+ // load through the real backend. Every V2 type is valid on both the
REST/IRC and Hive backends,
+ // so this runs unconditionally under both subclasses of this base class.
+ Column[] columns =
+ new Column[] {
+ Column.of("c_boolean", Types.BooleanType.get(), "boolean col"),
+ Column.of("c_float", Types.FloatType.get(), "float col"),
+ Column.of("c_double", Types.DoubleType.get(), "double col"),
+ Column.of("c_uuid", Types.UUIDType.get(), "uuid col"),
+ Column.of("c_fixed", Types.FixedType.of(16), "fixed col"),
+ Column.of("c_binary", Types.BinaryType.get(), "binary col"),
+ Column.of("c_decimal", Types.DecimalType.of(10, 2), "decimal col"),
Review Comment:
Could you clarify what you’re asking?
- If you mean, “Why isn’t `struct` included here?”: it is already covered by
`testCreateAndLoadIcebergTable` through `createColumns()`. This test covers V2
types not otherwise tested end to end.
- If you mean, “Why should we support `decimal`?”: it is a supported Iceberg
V2 type without existing end-to-end coverage. This test verifies that its
precision and scale survive the live backend create-and-load path.
Refs: https://iceberg.apache.org/spec/#primitive-types
--
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]