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

This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
Kibana Machine 2024-10-07 19:58:10 +11:00 committed by GitHub
parent 4904351999
commit c392aba39f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 104 additions and 0 deletions

View file

@ -1834,6 +1834,22 @@ const greatestDefinition: FunctionDefinition = {
returnType: 'boolean',
minParams: 1,
},
{
params: [
{
name: 'first',
type: 'date',
optional: false,
},
{
name: 'rest',
type: 'date',
optional: true,
},
],
returnType: 'date',
minParams: 1,
},
{
params: [
{
@ -2072,6 +2088,22 @@ const leastDefinition: FunctionDefinition = {
returnType: 'boolean',
minParams: 1,
},
{
params: [
{
name: 'first',
type: 'date',
optional: false,
},
{
name: 'rest',
type: 'date',
optional: true,
},
],
returnType: 'date',
minParams: 1,
},
{
params: [
{
@ -5734,6 +5766,45 @@ const replaceDefinition: FunctionDefinition = {
examples: ['ROW str = "Hello World"\n| EVAL str = REPLACE(str, "World", "Universe")\n| KEEP str'],
};
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
const reverseDefinition: FunctionDefinition = {
type: 'eval',
name: 'reverse',
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.reverse', {
defaultMessage: 'Returns a new string representing the input string in reverse order.',
}),
alias: undefined,
signatures: [
{
params: [
{
name: 'str',
type: 'keyword',
optional: false,
},
],
returnType: 'keyword',
},
{
params: [
{
name: 'str',
type: 'text',
optional: false,
},
],
returnType: 'text',
},
],
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
supportedOptions: ['by'],
validate: undefined,
examples: [
'ROW message = "Some Text" | EVAL message_reversed = REVERSE(message);',
'ROW bending_arts = "💧🪨🔥💨" | EVAL bending_arts_reversed = REVERSE(bending_arts);',
],
};
// Do not edit this manually... generated by scripts/generate_function_definitions.ts
const rightDefinition: FunctionDefinition = {
type: 'eval',
@ -8767,6 +8838,7 @@ export const scalarFunctionDefinitions = [
qstrDefinition,
repeatDefinition,
replaceDefinition,
reverseDefinition,
rightDefinition,
roundDefinition,
rtrimDefinition,

View file

@ -1906,6 +1906,38 @@ export const functions = {
| EVAL str = REPLACE(str, "World", "Universe")
| KEEP str
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
ignoreTag: true,
}
)}
/>
),
},
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
{
label: i18n.translate('languageDocumentation.documentationESQL.reverse', {
defaultMessage: 'REVERSE',
}),
description: (
<Markdown
openLinksInNewTab
readOnly
enableSoftLineBreaks
markdownContent={i18n.translate(
'languageDocumentation.documentationESQL.reverse.markdown',
{
defaultMessage: `<!--
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
-->
### REVERSE
Returns a new string representing the input string in reverse order.
\`\`\`
ROW message = "Some Text" | EVAL message_reversed = REVERSE(message);
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',