Skip to content

Commit 29ad3c0

Browse files
committed
Add doc for agg_over_time
1 parent f07de5a commit 29ad3c0

File tree

13 files changed

+253
-2
lines changed

13 files changed

+253
-2
lines changed

docs/reference/query-languages/esql/_snippets/functions/description/max_over_time.md

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/examples/max_over_time.md

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/max_over_time.md

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/parameters/max_over_time.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/types/max_over_time.md

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/images/functions/max_over_time.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/query-languages/esql/kibana/definition/functions/max_over_time.json

Lines changed: 133 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/docs/functions/max_over_time.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/qa/testFixtures/src/main/resources/k8s-timeseries.csv-spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,13 @@ null | three | 2024-05-10T00:01:00.000
167167

168168

169169
max_over_time
170+
170171
required_capability: metrics_command
171172
required_capability: max_over_time
172-
TS k8s | STATS cost=sum(max_over_time(network.cost)) BY cluster, time_bucket = bucket(@timestamp,1minute) | SORT cost DESC, time_bucket DESC, cluster | LIMIT 10;
173+
// tag::max_over_time[]
174+
TS k8s | STATS cost=sum(max_over_time(network.cost)) BY cluster, time_bucket = bucket(@timestamp,1minute)
175+
// tag::max_over_time[]
176+
| SORT cost DESC, time_bucket DESC, cluster | LIMIT 10;
173177

174178
cost:double | cluster:keyword | time_bucket:datetime
175179
32.75 | qa | 2024-05-10T00:17:00.000Z

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/FunctionType.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ public enum FunctionType {
2121
* For example, {@code MAX} in {@code | STATS MAX(LENGTH(string))}.
2222
*/
2323
AGGREGATE,
24+
25+
/**
26+
* Functions that can only appear in the aggregate" position of a {@code STATS}
27+
* started with TS.
28+
* For example, {@code MAX_OVER_TIME} in {@code | STATS MAX(MAX_OVER_TIME(string))}.
29+
*/
30+
TIME_SERIES_AGGREGATE,
2431
/**
2532
* Functions that can only appear in the "grouping" position of a {@code STATS}.
2633
* For example, {@code CATEGORIZE} in {@code | STATS MAX(a) BY CATEGORIZE(message)}.

0 commit comments

Comments
 (0)