Tartarus0zm commented on a change in pull request #18967:
URL: https://github.com/apache/flink/pull/18967#discussion_r836055222
##########
File path:
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/calcite/PreValidateReWriter.scala
##########
@@ -391,8 +392,19 @@ object PreValidateReWriter {
== desiredType)) {
node
} else {
- SqlStdOperatorTable.CAST.createCall(SqlParserPos.ZERO,
- node, SqlTypeUtil.convertTypeToSpec(desiredType))
+ // See FLINK-26460 for more details
+ val sqlDataTypeSpec =
+ if (currentType.getSqlTypeName == SqlTypeName.NULL
+ && desiredType.getSqlTypeName == SqlTypeName.MAP) {
+ new SqlDataTypeSpec(
+ new
SqlMapTypeNameSpec(SqlTypeUtil.convertTypeToSpec(desiredType.getKeyType),
Review comment:
Thanks for remind, I has fix it.
--
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]