diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts index d45271b189915..d76b4d9b03ad9 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts @@ -620,7 +620,7 @@ const categorizeDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'integer', + returnType: 'keyword', }, { params: [ @@ -630,7 +630,7 @@ const categorizeDefinition: FunctionDefinition = { optional: false, }, ], - returnType: 'integer', + returnType: 'keyword', }, ], supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'], @@ -2476,6 +2476,48 @@ const ipPrefixDefinition: FunctionDefinition = { ], }; +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +const kqlDefinition: FunctionDefinition = { + type: 'eval', + name: 'kql', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.kql', { + defaultMessage: + 'Performs a KQL query. Returns true if the provided KQL query string matches the row.', + }), + ignoreAsSuggestion: true, + + preview: true, + alias: undefined, + signatures: [ + { + params: [ + { + name: 'query', + type: 'keyword', + optional: false, + }, + ], + returnType: 'boolean', + }, + { + params: [ + { + name: 'query', + type: 'text', + optional: false, + }, + ], + returnType: 'boolean', + }, + ], + supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: [ + 'FROM books \n| WHERE KQL("author: Faulkner")\n| KEEP book_no, author \n| SORT book_no \n| LIMIT 5;', + ], +}; + // Do not edit this manually... generated by scripts/generate_function_definitions.ts const leastDefinition: FunctionDefinition = { type: 'eval', @@ -9612,6 +9654,7 @@ export const scalarFunctionDefinitions = [ greatestDefinition, hypotDefinition, ipPrefixDefinition, + kqlDefinition, leastDefinition, leftDefinition, lengthDefinition,