|
@@ -14,6 +14,9 @@ import org.elasticsearch.xpack.esql.core.expression.Literal;
|
|
|
import org.elasticsearch.xpack.esql.core.tree.NodeInfo;
|
|
|
import org.elasticsearch.xpack.esql.core.tree.Source;
|
|
|
import org.elasticsearch.xpack.esql.core.type.DataType;
|
|
|
+import org.elasticsearch.xpack.esql.expression.function.Example;
|
|
|
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesTo;
|
|
|
+import org.elasticsearch.xpack.esql.expression.function.FunctionAppliesToLifecycle;
|
|
|
import org.elasticsearch.xpack.esql.expression.function.FunctionInfo;
|
|
|
import org.elasticsearch.xpack.esql.expression.function.FunctionType;
|
|
|
import org.elasticsearch.xpack.esql.expression.function.Param;
|
|
@@ -34,9 +37,12 @@ public class SumOverTime extends TimeSeriesAggregateFunction {
|
|
|
);
|
|
|
|
|
|
@FunctionInfo(
|
|
|
- returnType = { "double", "integer", "long" },
|
|
|
+ returnType = { "double", "long" },
|
|
|
description = "The sum over time value of a field.",
|
|
|
- type = FunctionType.AGGREGATE
|
|
|
+ type = FunctionType.TIME_SERIES_AGGREGATE,
|
|
|
+ appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.UNAVAILABLE) },
|
|
|
+ note = "Available with the [TS](/reference/query-languages/esql/commands/source-commands.md#esql-ts) command in snapshot builds",
|
|
|
+ examples = { @Example(file = "k8s-timeseries", tag = "sum_over_time") }
|
|
|
)
|
|
|
public SumOverTime(
|
|
|
Source source,
|