xuzifu666 commented on code in PR #4453:
URL: https://github.com/apache/calcite/pull/4453#discussion_r2181541592
##########
core/src/main/java/org/apache/calcite/sql/dialect/ClickHouseSqlDialect.java:
##########
@@ -156,22 +154,17 @@ public ClickHouseSqlDialect(Context context) {
requireNonNull(keySpec, "keySpec");
SqlDataTypeSpec nonNullValueSpec =
requireNonNull(valueSpec, "valueSpec");
- SqlMapTypeNameSpec sqlMapTypeNameSpec =
- new
RelToSqlConverterUtil.ClickHouseSqlMapTypeNameSpec(nonNullKeySpec,
nonNullValueSpec,
- SqlParserPos.ZERO);
- return new SqlDataTypeSpec(sqlMapTypeNameSpec,
- SqlParserPos.ZERO);
+ return
RelToSqlConverterUtil.getCastSpecClickHouseSqlMapType(nonNullKeySpec,
+ nonNullValueSpec, SqlParserPos.ZERO);
case ARRAY:
ArraySqlType arraySqlType = (ArraySqlType) type;
Review Comment:
Here need to call the ClickHouseSqlDialect##getCastSpec method before. If
included it to getCastSpecClickHouseSqlArrayType , there should be coupling.
Otherwise need to include the dialect object into RelToSqlConverterUtil too. If
this is fitable, I will modify it. @NobiGo
--
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]