Skip to content

Commit 2c0e66e

Browse files
authored
ESQL: Accept unsigned longs on MAX and MIN aggregations (#131694)
Solved #112006, but I'll change other uses of "representable" in another PR, so keeping it open. - Fix aggregation tests to accept unsigned longs (They weren't correctly handling BigIntegers) - Added unsigned long support for Max and Min (No new logics, reusing the existing Long aggregators) - Test and docs
1 parent 65985ea commit 2c0e66e

File tree

29 files changed

+282
-29
lines changed

29 files changed

+282
-29
lines changed

docs/changelog/131694.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 131694
2+
summary: Accept unsigned longs on MAX and MIN aggregations
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/reference/query-languages/esql/_snippets/functions/types/max.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/types/max_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/types/min.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/types/min_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/kibana/definition/functions/max.json

Lines changed: 12 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/definition/functions/max_over_time.json

Lines changed: 12 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/definition/functions/min.json

Lines changed: 12 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/definition/functions/min_over_time.json

Lines changed: 12 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/stats.csv-spec

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ l:long
55
5
66
;
77

8+
maxOfUnsignedLong
9+
required_capability: agg_max_min_unsigned_long
10+
from ul_logs | stats ul = max(bytes_in);
11+
12+
ul:ul
13+
18446744073709551615
14+
;
15+
816
maxOfInteger
917
// tag::max[]
1018
FROM employees
@@ -18,6 +26,21 @@ MAX(languages):integer
1826
// end::max-result[]
1927
;
2028

29+
minOfLong
30+
from employees | stats l = min(languages.long);
31+
32+
l:long
33+
1
34+
;
35+
36+
minOfUnsignedLong
37+
required_capability: agg_max_min_unsigned_long
38+
from ul_logs | stats ul = min(bytes_in);
39+
40+
ul:ul
41+
0
42+
;
43+
2144
minOfInteger
2245
// tag::min[]
2346
FROM employees

0 commit comments

Comments
 (0)