Skip to content

Commit be66035

Browse files
committed
Update function metadata
1 parent 3790a2e commit be66035

7 files changed

Lines changed: 540 additions & 1 deletion

File tree

src/platform/packages/private/kbn-language-documentation/src/sections/generated/scalar_functions.tsx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,6 +3663,38 @@ export const functions = {
36633663
| MV_EXPAND wkt
36643664
| EVAL geom = TO_CARTESIANSHAPE(wkt)
36653665
\`\`\`
3666+
`,
3667+
description:
3668+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
3669+
ignoreTag: true,
3670+
}
3671+
),
3672+
},
3673+
},
3674+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
3675+
{
3676+
label: i18n.translate('languageDocumentation.documentationESQL.to_counter', {
3677+
defaultMessage: 'TO_COUNTER',
3678+
}),
3679+
preview: false,
3680+
license: undefined,
3681+
description: {
3682+
markdownContent: i18n.translate(
3683+
'languageDocumentation.documentationESQL.to_counter.markdown',
3684+
{
3685+
defaultMessage: `
3686+
### TO COUNTER
3687+
Converts a numeric value to its counter equivalent. The output type is determined by the input:
3688+
\`long\` converts to \`counter_long\`, \`integer\` to \`counter_integer\`, and \`double\` to \`counter_double\`.
3689+
No values are modified; only the type annotation changes. If the input is already a counter, the function is a no-op. This is useful when a metric field was misclassified as a plain numeric type instead of a counter in the index mapping.
3690+
This function is also available as the \`::counter\` cast operator.
3691+
3692+
\`\`\`esql
3693+
TS k8s
3694+
| STATS rate_bytes_in=avg(rate(network.total_bytes_in::counter)) BY time_bucket = bucket(@timestamp,1minute)
3695+
| EVAL rate_bytes_in=ROUND(rate_bytes_in, 6) | KEEP rate_bytes_in, time_bucket
3696+
| SORT rate_bytes_in DESC, time_bucket DESC | LIMIT 10;
3697+
\`\`\`
36663698
`,
36673699
description:
36683700
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
@@ -3867,6 +3899,40 @@ export const functions = {
38673899
| KEEP responseTime, converted
38683900
;
38693901
\`\`\`
3902+
`,
3903+
description:
3904+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
3905+
ignoreTag: true,
3906+
}
3907+
),
3908+
},
3909+
},
3910+
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
3911+
{
3912+
label: i18n.translate('languageDocumentation.documentationESQL.to_gauge', {
3913+
defaultMessage: 'TO_GAUGE',
3914+
}),
3915+
preview: false,
3916+
license: undefined,
3917+
description: {
3918+
markdownContent: i18n.translate(
3919+
'languageDocumentation.documentationESQL.to_gauge.markdown',
3920+
{
3921+
defaultMessage: `
3922+
### TO GAUGE
3923+
Converts a counter value to its gauge (plain numeric) equivalent. The output type is determined by the input:
3924+
\`counter_long\` converts to \`long\`, \`counter_integer\` to \`integer\`, and \`counter_double\` to \`double\`.
3925+
No values are modified; only the type annotation changes. If the input is already a plain numeric or \`aggregate_metric_double\`, the function is a no-op. This is useful when a metric field was misclassified as a counter type instead of a plain numeric (gauge) in the index mapping.
3926+
This function is also available as the \`::gauge\` cast operator.
3927+
3928+
\`\`\`esql
3929+
TS k8s
3930+
| STATS bytes_in = avg(avg_over_time(network.bytes_in::gauge)) BY cluster, time_bucket = bucket(@timestamp, 10minute)
3931+
| EVAL bytes_in = round(bytes_in, 4)
3932+
| KEEP bytes_in, cluster, time_bucket
3933+
| SORT time_bucket, cluster
3934+
| LIMIT 10;
3935+
\`\`\`
38703936
`,
38713937
description:
38723938
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',

src/platform/packages/shared/kbn-esql-language/src/commands/definitions/generated/aggregation_functions.ts

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,6 +1444,17 @@ const earliestDefinition: FunctionDefinition = {
14441444
],
14451445
returnType: 'date_nanos',
14461446
},
1447+
{
1448+
params: [
1449+
{
1450+
name: 'field',
1451+
type: 'dense_vector',
1452+
optional: false,
1453+
description: 'The search field',
1454+
},
1455+
],
1456+
returnType: 'dense_vector',
1457+
},
14471458
{
14481459
params: [
14491460
{
@@ -1455,6 +1466,17 @@ const earliestDefinition: FunctionDefinition = {
14551466
],
14561467
returnType: 'double',
14571468
},
1469+
{
1470+
params: [
1471+
{
1472+
name: 'field',
1473+
type: 'exponential_histogram',
1474+
optional: false,
1475+
description: 'The search field',
1476+
},
1477+
],
1478+
returnType: 'exponential_histogram',
1479+
},
14581480
{
14591481
params: [
14601482
{
@@ -1554,6 +1576,17 @@ const earliestDefinition: FunctionDefinition = {
15541576
],
15551577
returnType: 'long',
15561578
},
1579+
{
1580+
params: [
1581+
{
1582+
name: 'field',
1583+
type: 'tdigest',
1584+
optional: false,
1585+
description: 'The search field',
1586+
},
1587+
],
1588+
returnType: 'tdigest',
1589+
},
15571590
{
15581591
params: [
15591592
{
@@ -1945,6 +1978,74 @@ const firstDefinition: FunctionDefinition = {
19451978
],
19461979
returnType: 'date_nanos',
19471980
},
1981+
{
1982+
params: [
1983+
{
1984+
name: 'field',
1985+
type: 'dense_vector',
1986+
optional: false,
1987+
description: 'The search field',
1988+
},
1989+
{
1990+
name: 'sortField',
1991+
type: 'date',
1992+
optional: false,
1993+
description: 'The sort field',
1994+
},
1995+
],
1996+
returnType: 'dense_vector',
1997+
},
1998+
{
1999+
params: [
2000+
{
2001+
name: 'field',
2002+
type: 'dense_vector',
2003+
optional: false,
2004+
description: 'The search field',
2005+
},
2006+
{
2007+
name: 'sortField',
2008+
type: 'date_nanos',
2009+
optional: false,
2010+
description: 'The sort field',
2011+
},
2012+
],
2013+
returnType: 'dense_vector',
2014+
},
2015+
{
2016+
params: [
2017+
{
2018+
name: 'field',
2019+
type: 'dense_vector',
2020+
optional: false,
2021+
description: 'The search field',
2022+
},
2023+
{
2024+
name: 'sortField',
2025+
type: 'integer',
2026+
optional: false,
2027+
description: 'The sort field',
2028+
},
2029+
],
2030+
returnType: 'dense_vector',
2031+
},
2032+
{
2033+
params: [
2034+
{
2035+
name: 'field',
2036+
type: 'dense_vector',
2037+
optional: false,
2038+
description: 'The search field',
2039+
},
2040+
{
2041+
name: 'sortField',
2042+
type: 'long',
2043+
optional: false,
2044+
description: 'The sort field',
2045+
},
2046+
],
2047+
returnType: 'dense_vector',
2048+
},
19482049
{
19492050
params: [
19502051
{
@@ -2013,6 +2114,74 @@ const firstDefinition: FunctionDefinition = {
20132114
],
20142115
returnType: 'double',
20152116
},
2117+
{
2118+
params: [
2119+
{
2120+
name: 'field',
2121+
type: 'exponential_histogram',
2122+
optional: false,
2123+
description: 'The search field',
2124+
},
2125+
{
2126+
name: 'sortField',
2127+
type: 'date',
2128+
optional: false,
2129+
description: 'The sort field',
2130+
},
2131+
],
2132+
returnType: 'exponential_histogram',
2133+
},
2134+
{
2135+
params: [
2136+
{
2137+
name: 'field',
2138+
type: 'exponential_histogram',
2139+
optional: false,
2140+
description: 'The search field',
2141+
},
2142+
{
2143+
name: 'sortField',
2144+
type: 'date_nanos',
2145+
optional: false,
2146+
description: 'The sort field',
2147+
},
2148+
],
2149+
returnType: 'exponential_histogram',
2150+
},
2151+
{
2152+
params: [
2153+
{
2154+
name: 'field',
2155+
type: 'exponential_histogram',
2156+
optional: false,
2157+
description: 'The search field',
2158+
},
2159+
{
2160+
name: 'sortField',
2161+
type: 'integer',
2162+
optional: false,
2163+
description: 'The sort field',
2164+
},
2165+
],
2166+
returnType: 'exponential_histogram',
2167+
},
2168+
{
2169+
params: [
2170+
{
2171+
name: 'field',
2172+
type: 'exponential_histogram',
2173+
optional: false,
2174+
description: 'The search field',
2175+
},
2176+
{
2177+
name: 'sortField',
2178+
type: 'long',
2179+
optional: false,
2180+
description: 'The sort field',
2181+
},
2182+
],
2183+
returnType: 'exponential_histogram',
2184+
},
20162185
{
20172186
params: [
20182187
{
@@ -2625,6 +2794,74 @@ const firstDefinition: FunctionDefinition = {
26252794
],
26262795
returnType: 'long',
26272796
},
2797+
{
2798+
params: [
2799+
{
2800+
name: 'field',
2801+
type: 'tdigest',
2802+
optional: false,
2803+
description: 'The search field',
2804+
},
2805+
{
2806+
name: 'sortField',
2807+
type: 'date',
2808+
optional: false,
2809+
description: 'The sort field',
2810+
},
2811+
],
2812+
returnType: 'tdigest',
2813+
},
2814+
{
2815+
params: [
2816+
{
2817+
name: 'field',
2818+
type: 'tdigest',
2819+
optional: false,
2820+
description: 'The search field',
2821+
},
2822+
{
2823+
name: 'sortField',
2824+
type: 'date_nanos',
2825+
optional: false,
2826+
description: 'The sort field',
2827+
},
2828+
],
2829+
returnType: 'tdigest',
2830+
},
2831+
{
2832+
params: [
2833+
{
2834+
name: 'field',
2835+
type: 'tdigest',
2836+
optional: false,
2837+
description: 'The search field',
2838+
},
2839+
{
2840+
name: 'sortField',
2841+
type: 'integer',
2842+
optional: false,
2843+
description: 'The sort field',
2844+
},
2845+
],
2846+
returnType: 'tdigest',
2847+
},
2848+
{
2849+
params: [
2850+
{
2851+
name: 'field',
2852+
type: 'tdigest',
2853+
optional: false,
2854+
description: 'The search field',
2855+
},
2856+
{
2857+
name: 'sortField',
2858+
type: 'long',
2859+
optional: false,
2860+
description: 'The sort field',
2861+
},
2862+
],
2863+
returnType: 'tdigest',
2864+
},
26282865
{
26292866
params: [
26302867
{
@@ -4952,6 +5189,7 @@ const sparklineDefinition: FunctionDefinition = {
49525189
defaultMessage:
49535190
'The values representing the y-axis values of a sparkline graph for a given aggregation over a period of time.',
49545191
}),
5192+
tsdbCompatible: false,
49555193
preview: true,
49565194
alias: undefined,
49575195
signatures: [

src/platform/packages/shared/kbn-esql-language/src/commands/definitions/generated/commands/commands.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export const commandsMetadata: Record<string, unknown> = {
1616
license: 'platinum',
1717
observability_tier: 'COMPLETE',
1818
},
19+
dedup: {
20+
type: 'command',
21+
name: 'dedup',
22+
},
1923
dissect: {
2024
type: 'command',
2125
name: 'dissect',
@@ -124,6 +128,7 @@ export const commandsMetadata: Record<string, unknown> = {
124128

125129
export enum EsqlCommandNames {
126130
CHANGE_POINT = 'change_point',
131+
DEDUP = 'dedup',
127132
DISSECT = 'dissect',
128133
DROP = 'drop',
129134
ENRICH = 'enrich',

0 commit comments

Comments
 (0)