Skip to content

Commit

Permalink
[8.x] [ES|QL] Update function metadata (elastic#201515) (elastic#201518)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Update function metadata
(elastic#201515)](elastic#201515)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kibana
Machine","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-25T07:10:24Z","message":"[ES|QL]
Update function metadata (elastic#201515)\n\nThis PR updates the function
definitions and inline docs based on the\r\nlatest metadata from
Elasticsearch.","sha":"30536b1d8c1d2eb8c7407d8c97cf3b0a46deb342","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:ES|QL","Team:ESQL","backport:version","v8.18.0"],"title":"[ES|QL]
Update function
metadata","number":201515,"url":"https://github.com/elastic/kibana/pull/201515","mergeCommit":{"message":"[ES|QL]
Update function metadata (elastic#201515)\n\nThis PR updates the function
definitions and inline docs based on the\r\nlatest metadata from
Elasticsearch.","sha":"30536b1d8c1d2eb8c7407d8c97cf3b0a46deb342"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201515","number":201515,"mergeCommit":{"message":"[ES|QL]
Update function metadata (elastic#201515)\n\nThis PR updates the function
definitions and inline docs based on the\r\nlatest metadata from
Elasticsearch.","sha":"30536b1d8c1d2eb8c7407d8c97cf3b0a46deb342"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
  • Loading branch information
kibanamachine authored Nov 25, 2024
1 parent b69e9c9 commit 4dd9f64
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -1871,6 +1921,7 @@ export const aggregationFunctionDefinitions = [
minDefinition,
percentileDefinition,
stCentroidAggDefinition,
stdDevDefinition,
sumDefinition,
topDefinition,
valuesDefinition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
<Markdown
openLinksInNewTab
readOnly
enableSoftLineBreaks
markdownContent={i18n.translate(
'languageDocumentation.documentationESQL.std_dev.markdown',
{
defaultMessage: `<!--
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
-->
### 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)',
Expand Down

0 comments on commit 4dd9f64

Please sign in to comment.