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 2021/11/20 09:34:55 UTC

[GitHub] [calcite] vlsi commented on a change in pull request #2614: [CALCITE-4895] MAP type in UDF cannot be externalized from json correctly

vlsi commented on a change in pull request #2614:
URL: https://github.com/apache/calcite/pull/2614#discussion_r753656126



##########
File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
##########
@@ -296,6 +296,13 @@ private RelDataType getRelDataType(RelDataTypeFactory typeFactory, Map<String, O
       componentType = toType(typeFactory, component);
       return typeFactory.createArrayType(componentType, -1);
 
+    case MAP:
+      Object key = requireNonNull(map.get("key"), "key");
+      Object value = requireNonNull(map.get("value"), "key");

Review comment:
       ```suggestion
         Object key = get(map, "key");
         Object value = get(map, "key");
   ```




-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org