Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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