Skip to content

Commit

Permalink
[maps] add required parameter 'version' to ESQL get columns request (#…
Browse files Browse the repository at this point in the history
…181752)

#180248 added `version` ESQL
requests. [This PR](#180248)
missed adding version to get columns request, resulting in get column
request failing. Resolves issue by populating `version` parameter.
  • Loading branch information
nreese authored Apr 25, 2024
1 parent 519f65a commit cff6de2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
import { i18n } from '@kbn/i18n';
import { lastValueFrom } from 'rxjs';
import type { DataView } from '@kbn/data-plugin/common';
import { getESQLAdHocDataview, getIndexPatternFromESQLQuery } from '@kbn/esql-utils';
import {
ESQL_LATEST_VERSION,
getESQLAdHocDataview,
getIndexPatternFromESQLQuery,
} from '@kbn/esql-utils';
import type { ESQLColumn, ESQLSearchReponse } from '@kbn/es-types';
import { ES_GEO_FIELD_TYPE } from '../../../../common/constants';
import { getData, getIndexPatternService } from '../../../kibana_services';
Expand Down Expand Up @@ -86,6 +90,7 @@ export function getFieldType(column: ESQLColumn) {
async function getColumns(esql: string) {
const params = {
query: esql + ' | limit 0',
version: ESQL_LATEST_VERSION,
};

try {
Expand Down

0 comments on commit cff6de2

Please sign in to comment.