diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.spec.tsx b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.spec.tsx index de5b4c5cd4f2..81f9575ab139 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.spec.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.spec.tsx @@ -102,8 +102,13 @@ describe("StatementsPage", () => { }; assert.equal(filterBySearchQuery(statement, "select"), true); - assert.equal(filterBySearchQuery(statement, "virtual table"), true); - assert.equal(filterBySearchQuery(statement, "group (scalar)"), true); + assert.equal(filterBySearchQuery(statement, "count"), true); + assert.equal(filterBySearchQuery(statement, "select count"), true); + assert.equal(filterBySearchQuery(statement, "cluster settings"), true); + + // Searching by plan should be false. + assert.equal(filterBySearchQuery(statement, "virtual table"), false); + assert.equal(filterBySearchQuery(statement, "group (scalar)"), false); assert.equal(filterBySearchQuery(statement, "node_build_info"), false); assert.equal(filterBySearchQuery(statement, "crdb_internal"), false); }); diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx index 2a86be1580a0..5539307ed84b 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx @@ -81,7 +81,6 @@ import { } from "../timeScaleDropdown"; import { commonStyles } from "../common"; -import { flattenTreeAttributes, planNodeToString } from "../statementDetails"; import moment from "moment"; const cx = classNames.bind(styles); const sortableTableCx = classNames.bind(sortableTableStyles); @@ -163,14 +162,7 @@ export function filterBySearchQuery( statement: AggregateStatistics, search: string, ): boolean { - const label = statement.label; - const plan = planNodeToString( - flattenTreeAttributes( - statement.stats.sensitive_info && - statement.stats.sensitive_info.most_recent_plan_description, - ), - ); - const matchString = `${label} ${plan}`.toLowerCase(); + const matchString = statement.label.toLowerCase(); return search .toLowerCase() .split(" ")