You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/05/15 08:31:48 UTC

[GitHub] [calcite] jacques-n commented on a change in pull request #1207: [CALCITE-3062] Do not populate provenanceMap if not debug

jacques-n commented on a change in pull request #1207: [CALCITE-3062] Do not populate provenanceMap if not debug
URL: https://github.com/apache/calcite/pull/1207#discussion_r284141859
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
 ##########
 @@ -276,6 +276,9 @@ public VolcanoPlanner(RelOptCostFactory costFactory, //
     super(costFactory == null ? VolcanoCost.FACTORY : costFactory, //
         externalContext);
     this.zeroCost = this.costFactory.makeZeroCost();
+    // If LOGGER is debug enabled, enable provenance information to be captured
+    this.provenanceMap = LOGGER.isDebugEnabled() ? new HashMap<>()
+        : Util.blackholeMap();
 
 Review comment:
   Naming is very subjective. It is would be helpful if you provide an alternative suggestion if you're unhappy with a name. What do people think about NullMap, DevNullMap, and ForgetfulMap?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services