diqiu50 commented on code in PR #8209:
URL: https://github.com/apache/gravitino/pull/8209#discussion_r2292506013


##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/jdbc/postgresql/PostgreSQLDataTypeTransformer.java:
##########
@@ -83,6 +83,13 @@ public Type getGravitinoType(io.trino.spi.type.Type type) {
       }
 
       return Types.VarCharType.of(varcharType.getLength().get());
+    } else if (typeClass == io.trino.spi.type.ArrayType.class) {
+      return Types.ListType.of(
+          getGravitinoType(((io.trino.spi.type.ArrayType) 
type).getElementType()), false);
+    } else if (typeClass == io.trino.spi.type.MapType.class) {
+      io.trino.spi.type.MapType mapType = (io.trino.spi.type.MapType) type;
+      return Types.MapType.of(
+          getGravitinoType(mapType.getKeyType()), 
getGravitinoType(mapType.getValueType()), false);

Review Comment:
   PostgreSQL does not support common nullable elements in array types
   
   
https://github.com/apache/gravitino/blob/fd0828c50a15d007016e49f7d5813fd03711bec0/catalogs/catalog-jdbc-postgresql/src/main/java/org/apache/gravitino/catalog/postgresql/converter/PostgreSqlTypeConverter.java#L142-L157



-- 
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]

Reply via email to