Skip to content

Commit

Permalink
[ES|QL] Removes the sanitize function from the strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Nov 23, 2023
1 parent 87cc4c2 commit 15abd9a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/plugins/data/common/search/expressions/esql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ function normalizeType(type: string): DatatableColumnType {
}
}

function sanitize(value: string) {
return value.replace(/[\(\)]/g, '_');
}

function extractTypeAndReason(attributes: any): { type?: string; reason?: string } {
if (['type', 'reason'].every((prop) => prop in attributes)) {
return attributes;
Expand Down Expand Up @@ -249,8 +245,8 @@ export const getEsqlFn = ({ getStartDependencies }: EsqlFnArguments) => {
map(({ rawResponse: body, warning }) => {
const columns =
body.columns?.map(({ name, type }) => ({
id: sanitize(name),
name: sanitize(name),
id: name,
name,
meta: { type: normalizeType(type) },
})) ?? [];
const columnNames = columns.map(({ name }) => name);
Expand Down

0 comments on commit 15abd9a

Please sign in to comment.