Skip to content

Commit

Permalink
ui: allow stmts page to search across explain plan page
Browse files Browse the repository at this point in the history
Partially addresses #71615.

Previously, the search functionality for the stmts page only allowed a search
through the statement query. This change adds the statement's Plan as part of
that search.

Release note (ui change): logical plan text included in searchable text for
stmts page.
  • Loading branch information
Gerardo Torres committed Jan 18, 2022
1 parent 156ff11 commit 0430420
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ function warnForAttribute(attr: IAttr): boolean {

// planNodeAttrsToString converts an array of FlatPlanNodeAttribute[] into a string.
export function planNodeAttrsToString(attrs: FlatPlanNodeAttribute[]): string {
attrs.map(attr => `${attr.key} ${attr.values.join(" ")}`).join(" ");
return attrs.map(attr => `${attr.key} ${attr.values.join(" ")}`).join(" ");
}

Expand All @@ -67,10 +66,9 @@ export function planNodeToString(plan: FlatPlanNode): string {
const str = `${plan.name} ${planNodeAttrsToString(plan.attrs)}`;

if (plan.children.length > 0) {
const str2 = plan.children
return plan.children
.map(child => `${str} ${planNodeToString(child)}`)
.join(" ");
return str2;
}
return str;
}
Expand Down

0 comments on commit 0430420

Please sign in to comment.