Skip to content
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 @@ -3663,6 +3663,38 @@ 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_counter', {
defaultMessage: 'TO_COUNTER',
}),
preview: false,
license: undefined,
description: {
markdownContent: i18n.translate(
'languageDocumentation.documentationESQL.to_counter.markdown',
{
defaultMessage: `
### TO COUNTER
Converts a numeric value to its counter equivalent. The output type is determined by the input:
\`long\` converts to \`counter_long\`, \`integer\` to \`counter_integer\`, and \`double\` to \`counter_double\`.
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.
This function is also available as the \`::counter\` cast operator.

\`\`\`esql
TS k8s
| STATS rate_bytes_in=avg(rate(network.total_bytes_in::counter)) BY time_bucket = bucket(@timestamp,1minute)
| EVAL rate_bytes_in=ROUND(rate_bytes_in, 6) | KEEP rate_bytes_in, time_bucket
| SORT rate_bytes_in DESC, time_bucket DESC | LIMIT 10;
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
Expand Down Expand Up @@ -3867,6 +3899,40 @@ export const functions = {
| KEEP responseTime, converted
;
\`\`\`
`,
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_gauge', {
defaultMessage: 'TO_GAUGE',
}),
preview: false,
license: undefined,
description: {
markdownContent: i18n.translate(
'languageDocumentation.documentationESQL.to_gauge.markdown',
{
defaultMessage: `
### TO GAUGE
Converts a counter value to its gauge (plain numeric) equivalent. The output type is determined by the input:
\`counter_long\` converts to \`long\`, \`counter_integer\` to \`integer\`, and \`counter_double\` to \`double\`.
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.
This function is also available as the \`::gauge\` cast operator.

\`\`\`esql
TS k8s
| STATS bytes_in = avg(avg_over_time(network.bytes_in::gauge)) BY cluster, time_bucket = bucket(@timestamp, 10minute)
| EVAL bytes_in = round(bytes_in, 4)
| KEEP bytes_in, cluster, time_bucket
| SORT time_bucket, cluster
| LIMIT 10;
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,17 @@ const earliestDefinition: FunctionDefinition = {
],
returnType: 'date_nanos',
},
{
params: [
{
name: 'field',
type: 'dense_vector',
optional: false,
description: 'The search field',
},
],
returnType: 'dense_vector',
},
{
params: [
{
Expand All @@ -1455,6 +1466,17 @@ const earliestDefinition: FunctionDefinition = {
],
returnType: 'double',
},
{
params: [
{
name: 'field',
type: 'exponential_histogram',
optional: false,
description: 'The search field',
},
],
returnType: 'exponential_histogram',
},
{
params: [
{
Expand Down Expand Up @@ -1554,6 +1576,17 @@ const earliestDefinition: FunctionDefinition = {
],
returnType: 'long',
},
{
params: [
{
name: 'field',
type: 'tdigest',
optional: false,
description: 'The search field',
},
],
returnType: 'tdigest',
},
{
params: [
{
Expand Down Expand Up @@ -1945,6 +1978,74 @@ const firstDefinition: FunctionDefinition = {
],
returnType: 'date_nanos',
},
{
params: [
{
name: 'field',
type: 'dense_vector',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'date',
optional: false,
description: 'The sort field',
},
],
returnType: 'dense_vector',
},
{
params: [
{
name: 'field',
type: 'dense_vector',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'date_nanos',
optional: false,
description: 'The sort field',
},
],
returnType: 'dense_vector',
},
{
params: [
{
name: 'field',
type: 'dense_vector',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'integer',
optional: false,
description: 'The sort field',
},
],
returnType: 'dense_vector',
},
{
params: [
{
name: 'field',
type: 'dense_vector',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'long',
optional: false,
description: 'The sort field',
},
],
returnType: 'dense_vector',
},
{
params: [
{
Expand Down Expand Up @@ -2013,6 +2114,74 @@ const firstDefinition: FunctionDefinition = {
],
returnType: 'double',
},
{
params: [
{
name: 'field',
type: 'exponential_histogram',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'date',
optional: false,
description: 'The sort field',
},
],
returnType: 'exponential_histogram',
},
{
params: [
{
name: 'field',
type: 'exponential_histogram',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'date_nanos',
optional: false,
description: 'The sort field',
},
],
returnType: 'exponential_histogram',
},
{
params: [
{
name: 'field',
type: 'exponential_histogram',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'integer',
optional: false,
description: 'The sort field',
},
],
returnType: 'exponential_histogram',
},
{
params: [
{
name: 'field',
type: 'exponential_histogram',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'long',
optional: false,
description: 'The sort field',
},
],
returnType: 'exponential_histogram',
},
{
params: [
{
Expand Down Expand Up @@ -2625,6 +2794,74 @@ const firstDefinition: FunctionDefinition = {
],
returnType: 'long',
},
{
params: [
{
name: 'field',
type: 'tdigest',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'date',
optional: false,
description: 'The sort field',
},
],
returnType: 'tdigest',
},
{
params: [
{
name: 'field',
type: 'tdigest',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'date_nanos',
optional: false,
description: 'The sort field',
},
],
returnType: 'tdigest',
},
{
params: [
{
name: 'field',
type: 'tdigest',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'integer',
optional: false,
description: 'The sort field',
},
],
returnType: 'tdigest',
},
{
params: [
{
name: 'field',
type: 'tdigest',
optional: false,
description: 'The search field',
},
{
name: 'sortField',
type: 'long',
optional: false,
description: 'The sort field',
},
],
returnType: 'tdigest',
},
{
params: [
{
Expand Down Expand Up @@ -4952,6 +5189,7 @@ const sparklineDefinition: FunctionDefinition = {
defaultMessage:
'The values representing the y-axis values of a sparkline graph for a given aggregation over a period of time.',
}),
tsdbCompatible: false,
preview: true,
alias: undefined,
signatures: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const commandsMetadata: Record<string, unknown> = {
license: 'platinum',
observability_tier: 'COMPLETE',
},
dedup: {
type: 'command',
name: 'dedup',
},
dissect: {
type: 'command',
name: 'dissect',
Expand Down Expand Up @@ -124,6 +128,7 @@ export const commandsMetadata: Record<string, unknown> = {

export enum EsqlCommandNames {
CHANGE_POINT = 'change_point',
DEDUP = 'dedup',
DISSECT = 'dissect',
DROP = 'drop',
ENRICH = 'enrich',
Expand Down
Loading
Loading