Browse Source

Fixing docs and tests for timeseries no-longer-snapshot functions (#135395)

* Fixing docs and tests for timeseries no-longer-snapshot functions

* regen rate.md
P 2 weeks ago
parent
commit
5b6418ac87

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/rate.md

@@ -5,7 +5,7 @@
 The rate of a counter field.
 
 ::::{note}
-Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command in snapshot builds
+Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command
 ::::
 
 

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/rate.json

@@ -3,7 +3,7 @@
   "type" : "time_series_agg",
   "name" : "rate",
   "description" : "The rate of a counter field.",
-  "note" : "Available with the TS command in snapshot builds",
+  "note" : "Available with the TS command",
   "signatures" : [
     {
       "params" : [

+ 1 - 1
docs/reference/query-languages/esql/kibana/docs/functions/rate.md

@@ -3,7 +3,7 @@
 ### RATE
 The rate of a counter field.
 
-Note: Available with the [TS](https://www.elastic.co/docs/reference/query-languages/esql/commands/source-commands#esql-ts) command in snapshot builds
+Note: Available with the [TS](https://www.elastic.co/docs/reference/query-languages/esql/commands/source-commands#esql-ts) command
 
 ```esql
 TS k8s

+ 1 - 1
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Delta.java

@@ -46,7 +46,7 @@ public class Delta extends TimeSeriesAggregateFunction implements OptionalArgume
         returnType = { "double" },
         description = "The absolute change of a gauge field in a time window.",
         appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.UNAVAILABLE) },
-        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command in snapshot builds"
+        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command"
     )
     public Delta(Source source, @Param(name = "field", type = { "long", "integer", "double" }) Expression field) {
         this(source, field, new UnresolvedAttribute(source, "@timestamp"));

+ 1 - 1
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Idelta.java

@@ -48,7 +48,7 @@ public class Idelta extends TimeSeriesAggregateFunction implements OptionalArgum
             + "it ignores all but the last two data points in each time period). "
             + "This function is very similar to delta, but is more responsive to recent changes.",
         appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.UNAVAILABLE) },
-        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command in snapshot builds"
+        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command"
     )
     public Idelta(Source source, @Param(name = "field", type = { "long", "integer", "double" }) Expression field) {
         this(source, field, new UnresolvedAttribute(source, "@timestamp"));

+ 1 - 1
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Increase.java

@@ -51,7 +51,7 @@ public class Increase extends TimeSeriesAggregateFunction implements OptionalArg
         returnType = { "double" },
         description = "The absolute increase of a counter field in a time window.",
         appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.UNAVAILABLE) },
-        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command in snapshot builds"
+        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command"
     )
     public Increase(
         Source source,

+ 1 - 1
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Irate.java

@@ -48,7 +48,7 @@ public class Irate extends TimeSeriesAggregateFunction implements OptionalArgume
             + "it ignores all but the last two data points in each time period). "
             + "This function is very similar to rate, but is more responsive to recent changes in the rate of increase.",
         appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.UNAVAILABLE) },
-        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command in snapshot builds",
+        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command",
         examples = { @Example(file = "k8s-timeseries", tag = "irate") }
     )
     public Irate(Source source, @Param(name = "field", type = { "counter_long", "counter_integer", "counter_double" }) Expression field) {

+ 1 - 1
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Rate.java

@@ -46,7 +46,7 @@ public class Rate extends TimeSeriesAggregateFunction implements OptionalArgumen
         returnType = { "double" },
         description = "The rate of a counter field.",
         appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.UNAVAILABLE) },
-        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command in snapshot builds",
+        note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command",
         examples = { @Example(file = "k8s-timeseries", tag = "rate") }
     )
     public Rate(Source source, @Param(name = "field", type = { "counter_long", "counter_integer", "counter_double" }) Expression field) {

+ 1 - 1
x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/60_usage.yml

@@ -241,7 +241,7 @@ setup:
 
   # There's one of these per function but that's a ton of things to check. So we just spot check that a few exist.
   - not_exists: esql.functions.delay
-  - not_exists: esql.functions.idelta
+  - exists: esql.functions.idelta
   - exists: esql.functions.mv_sum
   - exists: esql.functions.to_dateperiod