vlsi 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_r364632768
##########
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:
I've extracted that to `class RexNode { ... public static Closeable
skipNormalize()` which is to be used in try-with-resources.
----------------------------------------------------------------
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