twalthr commented on code in PR #19648:
URL: https://github.com/apache/flink/pull/19648#discussion_r867997689


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/utils/SqlValidatorUtils.java:
##########
@@ -76,9 +80,25 @@ private static void adjustTypeForMultisetConstructor(
     }
 
     private static SqlNode castTo(SqlNode node, RelDataType type) {
-        return SqlStdOperatorTable.CAST.createCall(
-                SqlParserPos.ZERO,
-                node,
-                
SqlTypeUtil.convertTypeToSpec(type).withNullable(type.isNullable()));
+        final SqlDataTypeSpec dataTypeSpec;
+        if (SqlTypeUtil.isMap(type)) {

Review Comment:
   Btw in 
`org.apache.flink.table.planner.functions.inference.TypeInferenceOperandChecker#castTo`
 we would have a similar issue, correct?



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