You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by hy...@apache.org on 2020/01/27 23:14:08 UTC
[calcite] branch master updated: [CALCITE-3676]
VolcanoPlanner.dumpGraphviz should handle exception gracefully (Qianjin Xu)
This is an automated email from the ASF dual-hosted git repository.
hyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/master by this push:
new 0f09ef9 [CALCITE-3676] VolcanoPlanner.dumpGraphviz should handle exception gracefully (Qianjin Xu)
0f09ef9 is described below
commit 0f09ef99f4ffe66c209afcfa87e57d4db409d834
Author: XuQianJin-Stars <x1...@163.com>
AuthorDate: Wed Jan 15 10:21:17 2020 +0800
[CALCITE-3676] VolcanoPlanner.dumpGraphviz should handle exception gracefully (Qianjin Xu)
Close #1759
---
.../calcite/plan/volcano/VolcanoPlanner.java | 23 +++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java b/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
index afda2b5..684e241 100644
--- a/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
+++ b/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
@@ -1124,15 +1124,20 @@ public class VolcanoPlanner extends AbstractRelOptPlanner {
originalRoot.explain(
new RelWriterImpl(pw, SqlExplainLevel.ALL_ATTRIBUTES, false));
}
- if (CalciteSystemProperty.DUMP_SETS.value()) {
- pw.println();
- pw.println("Sets:");
- dumpSets(pw);
- }
- if (CalciteSystemProperty.DUMP_GRAPHVIZ.value()) {
- pw.println();
- pw.println("Graphviz:");
- dumpGraphviz(pw);
+
+ try {
+ if (CalciteSystemProperty.DUMP_SETS.value()) {
+ pw.println();
+ pw.println("Sets:");
+ dumpSets(pw);
+ }
+ if (CalciteSystemProperty.DUMP_GRAPHVIZ.value()) {
+ pw.println();
+ pw.println("Graphviz:");
+ dumpGraphviz(pw);
+ }
+ } catch (Exception | AssertionError e) {
+ pw.println("Error when dumping plan state: \n" + e);
}
}