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 210eec36811de9..28b4cd4f66443e 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 @@ -1434,7 +1434,7 @@ const topDefinition: FunctionDefinition = { params: [ { name: 'field', - type: 'long', + type: 'keyword', optional: false, }, { @@ -1451,8 +1451,48 @@ const topDefinition: FunctionDefinition = { acceptedValues: ['asc', 'desc'], }, ], + returnType: 'keyword', + }, + { + params: [ + { + name: 'field', + type: 'long', + optional: false, + }, + { + name: 'limit', + type: 'integer', + optional: false, + }, + { + name: 'order', + type: 'keyword', + optional: false, + }, + ], returnType: 'long', }, + { + params: [ + { + name: 'field', + type: 'text', + optional: false, + }, + { + name: 'limit', + type: 'integer', + optional: false, + }, + { + name: 'order', + type: 'keyword', + optional: false, + }, + ], + returnType: 'text', + }, ], supportedCommands: ['stats', 'inlinestats', 'metrics'], supportedOptions: undefined, diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts index aaf6929a4bccf4..c0556db33db37e 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/generated/scalar_functions.ts @@ -1421,7 +1421,7 @@ const dateFormatDefinition: FunctionDefinition = { supportedOptions: ['by'], validate: undefined, examples: [ - 'FROM employees\n| KEEP first_name, last_name, hire_date\n| EVAL hired = DATE_FORMAT("YYYY-MM-dd", hire_date)', + 'FROM employees\n| KEEP first_name, last_name, hire_date\n| EVAL hired = DATE_FORMAT("yyyy-MM-dd", hire_date)', ], }; @@ -7443,6 +7443,21 @@ const toCartesianshapeDefinition: FunctionDefinition = { ], }; +// Do not edit this manually... generated by scripts/generate_function_definitions.ts +const toDateNanosDefinition: FunctionDefinition = { + type: 'eval', + name: 'to_date_nanos', + description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.to_date_nanos', { + defaultMessage: 'Converts an input to a nanosecond-resolution date value (aka date_nanos).', + }), + alias: undefined, + signatures: [], + supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'], + supportedOptions: ['by'], + validate: undefined, + examples: [], +}; + // Do not edit this manually... generated by scripts/generate_function_definitions.ts const toDateperiodDefinition: FunctionDefinition = { type: 'eval', @@ -8777,6 +8792,7 @@ export const scalarFunctionDefinitions = [ toBooleanDefinition, toCartesianpointDefinition, toCartesianshapeDefinition, + toDateNanosDefinition, toDateperiodDefinition, toDatetimeDefinition, toDegreesDefinition, diff --git a/packages/kbn-language-documentation/src/sections/generated/scalar_functions.tsx b/packages/kbn-language-documentation/src/sections/generated/scalar_functions.tsx index 21d11e9c22a903..30e0de8fa8ac36 100644 --- a/packages/kbn-language-documentation/src/sections/generated/scalar_functions.tsx +++ b/packages/kbn-language-documentation/src/sections/generated/scalar_functions.tsx @@ -597,7 +597,7 @@ export const functions = { \`\`\` FROM employees | KEEP first_name, last_name, hire_date - | EVAL hired = DATE_FORMAT("YYYY-MM-dd", hire_date) + | EVAL hired = DATE_FORMAT("yyyy-MM-dd", hire_date) \`\`\` `, description: @@ -1190,7 +1190,7 @@ export const functions = { --> ### MV_AVG - Converts a multivalued field into a single valued field containing the average of all the values. + Converts a multivalued field into a single valued field containing the average of all of the values. \`\`\` ROW a=[3, 5, 1, 6] @@ -1676,7 +1676,7 @@ export const functions = { --> ### MV_SUM - Converts a multivalued field into a single valued field containing the sum of all the values. + Converts a multivalued field into a single valued field containing the sum of all of the values. \`\`\` ROW a=[3, 5, 6] @@ -2743,6 +2743,36 @@ export const functions = { | MV_EXPAND wkt | EVAL geom = TO_CARTESIANSHAPE(wkt) \`\`\` + `, + 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.to_date_nanos', { + defaultMessage: 'TO_DATE_NANOS', + }), + description: ( + + + ### TO_DATE_NANOS + Converts an input to a nanosecond-resolution date value (aka date_nanos). + + Note: The range for date nanos is 1970-01-01T00:00:00.000000000Z to 2262-04-11T23:47:16.854775807Z. Additionally, integers cannot be converted into date nanos, as the range of integer nanoseconds only covers about 2 seconds after epoch. `, description: 'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',