danny0405 commented on a change in pull request #1703: [CALCITE-2450] Normalize 
RexCall predicates when computing digest
URL: https://github.com/apache/calcite/pull/1703#discussion_r362355578
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/externalize/RelJsonWriter.java
 ##########
 @@ -140,6 +142,17 @@ public RelWriter done(RelNode node) {
   public String asString() {
     final Map<String, Object> map = jsonBuilder.map();
     map.put("rels", relList);
-    return jsonBuilder.toJsonString(map);
+    AtomicInteger skipNormalize = null;
+    if (getDetailLevel() != SqlExplainLevel.DIGEST_ATTRIBUTES) {
+      skipNormalize = RexNode.DESCRIBE_WITHOUT_NORMALIZE.get();
+      skipNormalize.incrementAndGet();
+    }
+    try {
 
 Review comment:
   This wrapper appears in many places, can we write a method to encapsulate 
that ?

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