[ES|QL] Update function metadata (#202395)

This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.
This commit is contained in:
Kibana Machine 2024-12-02 18:10:32 +11:00 committed by GitHub
parent e2a99ca01b
commit 6ef4912c65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,