commit | ff915a9ec1b0abcb1084545ac2ba6bd4362e476b | [log] [tgz] |
---|---|---|
author | Taewoo Kim <wangsaeu@yahoo.com> | Sat Apr 01 19:59:39 2017 -0700 |
committer | Taewoo Kim <wangsaeu@gmail.com> | Sat Apr 01 22:08:11 2017 -0700 |
tree | 2531eed9026c74e8232becc72fac120eb05b5a2e | |
parent | d66cfb8e51f0729f50d571f72b8252c8778f141c [diff] |
Fix ASTERIXDB-1867: get Plan String only when context is not null - Fix AbstractRuleController so that getPlanString() is only executed when context is not null. Change-Id: I4c4dfb50f16c48e4b09e8148d13f0debbd2de659 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1651 Reviewed-by: Xikui Wang <xkkwww@gmail.com> Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java index 98fe7b0..cfb3db1 100644 --- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java +++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
@@ -66,7 +66,7 @@ } private String getPlanString(Mutable<ILogicalOperator> opRef) throws AlgebricksException { - if (AlgebricksConfig.ALGEBRICKS_LOGGER.isLoggable(Level.FINE)) { + if (AlgebricksConfig.ALGEBRICKS_LOGGER.isLoggable(Level.FINE) && context != null) { LogicalOperatorPrettyPrintVisitor pvisitor = context.getPrettyPrintVisitor(); pvisitor.reset(new AlgebricksAppendable()); PlanPrettyPrinter.printOperator((AbstractLogicalOperator) opRef.getValue(), pvisitor, 0);