jcamachor commented on a change in pull request #1056: CALCITE-2858
URL: https://github.com/apache/calcite/pull/1056#discussion_r259028672
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##########
 @@ -391,13 +385,17 @@ RexNode toRex(RelInput relInput, Object o) {
       }
       if (map.containsKey("literal")) {
         final Object literal = map.get("literal");
-        final SqlTypeName sqlTypeName =
-            Util.enumVal(SqlTypeName.class, (String) map.get("type"));
+        final RelDataType type = toType(typeFactory, map.get("type"));
 
 Review comment:
   @kgyrtkirk , thanks for catching that. I have uploaded a follow-up fix and a 
test to verify that it all works as expected.
   You will see that the fix is quite simple. I am not sure how widely used the 
JSON reader/writer are, but I believe we should not break backwards 
compatibility since it is quite straightforward to keep it. Besides, versioning 
sounds like a good idea moving forward, but maybe not needed for this change? 
Could you take a look again?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to