From 2b037539e16f4125923eadd2527def43b0028af6 Mon Sep 17 00:00:00 2001 From: minghong Date: Mon, 23 Dec 2024 12:39:02 +0800 Subject: [PATCH] cascades==null --- .../main/java/org/apache/doris/nereids/NereidsPlanner.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java index bdbc1ba57b740f..b6b09348046cea 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java @@ -712,9 +712,10 @@ public String getExplainString(ExplainOptions explainOptions) { + rewrittenPlan.treeString() + "\n\n" + "========== OPTIMIZED PLAN " + getTimeMetricString(SummaryProfile::getPrettyNereidsOptimizeTime) + " ==========\n" - + optimizedPlan.treeString() + "\n\n" - + "========== MEMO " - + cascadesContext.getMemo().toString() + "\n\n"; + + optimizedPlan.treeString() + "\n\n"; + if (cascadesContext != null && cascadesContext.getMemo() != null) { + plan += "========== MEMO " + cascadesContext.getMemo().toString() + "\n\n"; + } if (distributedPlans != null && !distributedPlans.isEmpty()) { plan += "========== DISTRIBUTED PLAN "