justinmclean opened a new issue, #7983:
URL: https://github.com/apache/gravitino/issues/7983
### What would you like to be improved?
Correct Paimon type conversion by preserving nullability for list elements
and map values to avoid losing nullability information during Gravitino→Paimon
conversions. Code csan be found in
catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/utils/TypeUtils.java
Here's a test that shows the issue:
```
@Test
void testToPaimonTypeNullability() {
assertEquals(
DataTypes.ARRAY(DataTypes.INT().notNull()),
toPaimonType(Types.ListType.of(Types.IntegerType.get(), false)));
assertEquals(
DataTypes.ARRAY(DataTypes.INT().nullable()),
toPaimonType(Types.ListType.of(Types.IntegerType.get(), true)));
assertEquals(
DataTypes.MAP(DataTypes.STRING(), DataTypes.INT().notNull()),
toPaimonType(Types.MapType.of(Types.StringType.get(),
Types.IntegerType.get(), false)));
assertEquals(
DataTypes.MAP(DataTypes.STRING(), DataTypes.INT().nullable()),
toPaimonType(Types.MapType.of(Types.StringType.get(),
Types.IntegerType.get(), true)));
}
```
### How should we improve?
See above
--
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]