Skip to content

Commit 99d76fe

Browse files
authored
Merge branch 'main' into disable-downsampling-force-merge-via-mapping
2 parents a01f940 + f858d3e commit 99d76fe

File tree

95 files changed

+2059
-1884
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2059
-1884
lines changed
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
22

33
```esql
4-
ROW i=1, a=["a", "b"], b=[2, 3] | STATS MIN(i) BY a, b | SORT a ASC, b ASC
4+
ROW price = 10, color = ["blue", "pink", "yellow"], size = ["s", "m", "l"]
5+
| STATS SUM(price) BY color, size
56
```
67

7-
| MIN(i):integer | a:keyword | b:integer |
8+
| SUM(price):long | color:keyword | size:keyword |
89
| --- | --- | --- |
9-
| 1 | a | 2 |
10-
| 1 | a | 3 |
11-
| 1 | b | 2 |
12-
| 1 | b | 3 |
10+
| 10 | blue | l |
11+
| 10 | blue | m |
12+
| 10 | blue | s |
13+
| 10 | pink | l |
14+
| 10 | pink | m |
15+
| 10 | pink | s |
16+
| 10 | yellow | l |
17+
| 10 | yellow | m |
18+
| 10 | yellow | s |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
2+
3+
```esql
4+
ROW color = ["blue", "pink", "yellow"]
5+
| MV_EXPAND color
6+
| STATS VALUES(color) BY color
7+
```
8+
9+
| VALUES(color):keyword | color:keyword |
10+
| --- | --- |
11+
| blue | blue |
12+
| pink | pink |
13+
| yellow | yellow |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
2+
3+
```esql
4+
ROW color = ["blue", "pink", "yellow"]
5+
| STATS VALUES(color) BY color
6+
```
7+
8+
| VALUES(color):keyword | color:keyword |
9+
| --- | --- |
10+
| [blue, pink, yellow] | blue |
11+
| [blue, pink, yellow] | pink |
12+
| [blue, pink, yellow] | yellow |
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
22

33
```esql
4-
ROW i=1, a=["a", "b"] | STATS MIN(i) BY a | SORT a ASC
4+
ROW price = 10, color = ["blue", "pink", "yellow"]
5+
| STATS SUM(price) BY color
56
```
67

7-
| MIN(i):integer | a:keyword |
8+
| SUM(price):long | color:keyword |
89
| --- | --- |
9-
| 1 | a |
10-
| 1 | b |
10+
| 10 | blue |
11+
| 10 | pink |
12+
| 10 | yellow |

docs/reference/query-languages/esql/_snippets/commands/layout/stats-by.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ The following [aggregation functions](/reference/query-languages/esql/functions-
5151
:::{include} ../../lists/aggregation-functions.md
5252
:::
5353

54+
When `STATS` is used under the [`TS`](/reference/query-languages/esql/commands/ts.md) source command,
55+
[time series aggregation functions](/reference/query-languages/esql/functions-operators/time-series-aggregation-functions.md)
56+
are also supported.
57+
5458
The following [grouping functions](/reference/query-languages/esql/functions-operators/grouping-functions.md) are supported:
5559

5660
:::{include} ../../lists/grouping-functions.md
@@ -110,11 +114,24 @@ It’s also possible to group by multiple values:
110114

111115
:::{include} ../examples/stats.csv-spec/statsGroupByMultipleValues.md
112116
:::
117+
113118
If all the grouping keys are multivalued then the input row is in all groups:
114119

115120
:::{include} ../examples/stats.csv-spec/multi-mv-group.md
116121
:::
117122

123+
The input **ROW** is in all groups. The entire row. All the values. Even group
124+
keys. That means that:
125+
126+
:::{include} ../examples/stats.csv-spec/mv-group-values.md
127+
:::
128+
129+
The `VALUES` function above sees the whole row - all of the values of the group
130+
key. If you want to send the group key to the function then `MV_EXPAND` first:
131+
132+
:::{include} ../examples/stats.csv-spec/mv-group-values-expand.md
133+
:::
134+
118135
Both the aggregating functions and the grouping expressions accept other
119136
functions. This is useful for using `STATS` on multivalue columns.
120137
For example, to calculate the average salary change, you can use `MV_AVG` to

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

Lines changed: 1 addition & 1 deletion
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/absent_over_time.md

Lines changed: 1 addition & 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/avg_over_time.md

Lines changed: 1 addition & 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/count_distinct_over_time.md

Lines changed: 1 addition & 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/count_over_time.md

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

0 commit comments

Comments
 (0)