You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/10/22 03:49:13 UTC
[GitHub] [calcite] danny0405 commented on a change in pull request #1521:
[CALCITE-3429] Support MAP type for JavaToSqlTypeConversionRules
danny0405 commented on a change in pull request #1521: [CALCITE-3429] Support MAP type for JavaToSqlTypeConversionRules
URL: https://github.com/apache/calcite/pull/1521#discussion_r337311706
##########
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);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * For {@link JavaType} created with {@link Map} class,
+ * cannot get the type of key and value.
+ * Using ANY type as value type.
+ */
+ @Override public RelDataType getValueType() {
+ if (Map.class.isAssignableFrom(clazz)) {
Review comment:
Does any code use these 2 methods ?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services