From 4dd9f644b4d082e204ecca24dbc4eaa819618954 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:54:00 +1100 Subject: [PATCH] [8.x] [ES|QL] Update function metadata (#201515) (#201518) # Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Update function metadata (#201515)](https://github.com/elastic/kibana/pull/201515) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) --- .../generated/aggregation_functions.ts | 51 +++++++++++++++++++ .../generated/aggregation_functions.tsx | 34 +++++++++++++ 2 files changed, 85 insertions(+) diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/generated/aggregation_functions.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/generated/aggregation_functions.ts index 37dfe8de5822f..4bfdbb6a16395 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/generated/aggregation_functions.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/generated/aggregation_functions.ts @@ -1341,6 +1341,56 @@ const stCentroidAggDefinition: FunctionDefinition = { examples: ['FROM airports\n| STATS centroid=ST_CENTROID_AGG(location)'], }; +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +const stdDevDefinition: FunctionDefinition = { + type: 'agg', + name: 'std_dev', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.std_dev', { + defaultMessage: 'The standard deviation of a numeric field.', + }), + preview: false, + alias: undefined, + signatures: [ + { + params: [ + { + name: 'number', + type: 'double', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'integer', + optional: false, + }, + ], + returnType: 'double', + }, + { + params: [ + { + name: 'number', + type: 'long', + optional: false, + }, + ], + returnType: 'double', + }, + ], + supportedCommands: ['stats', 'inlinestats', 'metrics'], + supportedOptions: undefined, + validate: undefined, + examples: [ + 'FROM employees\n| STATS STD_DEV(height)', + 'FROM employees\n| STATS stddev_salary_change = STD_DEV(MV_MAX(salary_change))', + ], +}; + // Do not edit this manually... generated by scripts/generate_function_definitions.ts const sumDefinition: FunctionDefinition = { type: 'agg', @@ -1871,6 +1921,7 @@ export const aggregationFunctionDefinitions = [ minDefinition, percentileDefinition, stCentroidAggDefinition, + stdDevDefinition, sumDefinition, topDefinition, valuesDefinition, diff --git a/packages/kbn-language-documentation/src/sections/generated/aggregation_functions.tsx b/packages/kbn-language-documentation/src/sections/generated/aggregation_functions.tsx index 6fe761e489c04..96cbe74ab208f 100644 --- a/packages/kbn-language-documentation/src/sections/generated/aggregation_functions.tsx +++ b/packages/kbn-language-documentation/src/sections/generated/aggregation_functions.tsx @@ -318,6 +318,40 @@ export const functions = { FROM airports | STATS centroid=ST_CENTROID_AGG(location) \`\`\` + `, + 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.std_dev', { + defaultMessage: 'STD_DEV', + }), + preview: false, + description: ( + + + ### STD_DEV + The standard deviation of a numeric field. + + \`\`\` + FROM employees + | STATS STD_DEV(height) + \`\`\` `, description: 'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',