Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ES|QL] Update function metadata #201515

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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