Skip to content

Commit ed87ef5

Browse files
committed
Do not format null plan fragment
PlanFragment in StageInfo is Nullable and so it could be null. In such case calling formatFragment method for it does not make much sense as it simply throws NPE.
1 parent 0945330 commit ed87ef5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ public static String textDistributedPlan(
450450
queryStats.getExecutionTime().convertToMostSuccinctTimeUnit()));
451451

452452
for (StageInfo stageInfo : allStages) {
453+
if (stageInfo.getPlan() == null) {
454+
continue;
455+
}
453456
builder.append(formatFragment(
454457
tableScanNode -> tableInfos.get(tableScanNode.getId()),
455458
dynamicFilterDomainStats,

0 commit comments

Comments
 (0)