danny0405 commented on a change in pull request #1301: [CALCITE-3175] 
AssertionError during serializing RexLiteral with Enum type.
URL: https://github.com/apache/calcite/pull/1301#discussion_r306196436
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##########
 @@ -330,6 +330,9 @@ private Object toJson(RexNode node) {
       final Object value = literal.getValue3();
       map = jsonBuilder.map();
       map.put("literal", value);
+      if (value instanceof Enum) {
+        map.put("flag", value.getClass().getName());
+      }
 
 Review comment:
   Why we name the enum "flag" ? It makes me confused.

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