Skip to content

Commit

Permalink
Filter explain subplan nodes without any data (Should fix #210 + #184)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclarke committed Jul 19, 2023
1 parent afc77d0 commit ebc205e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions shared/studio/components/explainVis/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,17 @@ export function walkPlanNode(
contexts: Contexts,
planName: string | null = null
): Plan {
const subPlans: Plan[] = (data.children ?? []).map((child: any) =>
walkPlanNode(
child.node,
queryTotalTime,
queryTotalCost,
contexts,
child.name
)
);
const subPlans: Plan[] = (data.children ?? [])
.filter((child: any) => child.node != null)
.map((child: any) =>
walkPlanNode(
child.node,
queryTotalTime,
queryTotalCost,
contexts,
child.name
)
);

const totalTime =
data.actual_total_time !== undefined
Expand Down

0 comments on commit ebc205e

Please sign in to comment.