jinxing64 commented on a change in pull request #1521: [CALCITE-3429] Support
MAP type for JavaToSqlTypeConversionRules
URL: https://github.com/apache/calcite/pull/1521#discussion_r339323846
##########
File path:
core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
##########
@@ -603,6 +603,32 @@ public RelDataType getComponentType() {
}
}
+ /**
+ * For {@link JavaType} created with {@link Map} class,
+ * cannot get the type of key and value.
+ * Using ANY type as key type.
+ */
+ @Override public RelDataType getKeyType() {
+ if (Map.class.isAssignableFrom(clazz)) {
+ return createSqlType(SqlTypeName.ANY);
Review comment:
Say the map is by <Integer, Integer>
Why return SqlTypeName.ANY here ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services