yanlin-Lynn commented on a change in pull request #1372: [CALCITE-3246] 
NullPointerException while deserializing udf operator.
URL: https://github.com/apache/calcite/pull/1372#discussion_r313856954
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##########
 @@ -438,15 +438,17 @@ RexNode toRex(RelInput relInput, Object o) {
     } else if (o instanceof Map) {
       Map map = (Map) o;
       final Map<String, Object> opMap = (Map) map.get("op");
+      if (map.containsKey("class")) {
+        opMap.put("class", map.get("class"));
+      }
       final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
 
 Review comment:
   @chunweilei  thanks for point out. better to  move it down inside `if(opMap 
!= null)` block.

----------------------------------------------------------------
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

Reply via email to