suibianwanwank commented on code in PR #4406:
URL: https://github.com/apache/calcite/pull/4406#discussion_r2128224991


##########
core/src/main/java/org/apache/calcite/sql/dialect/PrestoSqlDialect.java:
##########
@@ -187,9 +191,35 @@ private static void unparseUsingLimit(SqlWriter writer, 
@Nullable SqlNode offset
     case BINARY:
       return new SqlDataTypeSpec(
           new SqlBasicTypeNameSpec(SqlTypeName.VARBINARY, SqlParserPos.ZERO), 
SqlParserPos.ZERO);
+    case MAP:
+      MapSqlType mapSqlType = (MapSqlType) type;
+      SqlDataTypeSpec keySpec = (SqlDataTypeSpec) 
getCastSpec(mapSqlType.getKeyType());
+      SqlDataTypeSpec valueSpec =
+          (SqlDataTypeSpec) getCastSpec(mapSqlType.getValueType());
+      @SuppressWarnings("argument.type.incompatible")
+      SqlMapTypeNameSpec sqlMapTypeNameSpec =
+          new SqlMapTypeNameSpec(keySpec, valueSpec, SqlParserPos.ZERO);
+      return new SqlDataTypeSpec(sqlMapTypeNameSpec,
+          SqlParserPos.ZERO);
+    case ARRAY:
+      ArraySqlType arraySqlType = (ArraySqlType) type;
+      SqlDataTypeSpec arrayValueSpec =
+          (SqlDataTypeSpec) getCastSpec(arraySqlType.getComponentType());
+      @SuppressWarnings("all")

Review Comment:
   Generally, you should use requireNonNull to pass validation rather than 
SuppressWarnings.



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