Skip to content

Commit 0f82f2b

Browse files
committed
Other edges
1 parent fd293dc commit 0f82f2b

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

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

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,37 @@ FROM date_nanos
4242
row
4343
required_capability: agg_first_last
4444
ROW a = 100, @timestamp = "2025-01-01"::DATETIME
45-
| STATS LAST(a, @timestamp)
45+
| STATS FIRST(a, @timestamp)
4646
;
4747

48-
LAST(a, @timestamp):integer
48+
FIRST(a, @timestamp):integer
4949
100
5050
;
51+
52+
double_by_null
53+
required_capability: agg_first_last
54+
FROM k8s
55+
| EVAL @timestamp = @timestamp + null
56+
| STATS first_network_cost = FIRST(network.cost, @timestamp) BY pod
57+
| SORT pod ASC
58+
;
59+
60+
first_network_cost:double | pod:keyword
61+
null | one
62+
null | three
63+
null | two
64+
;
65+
66+
null_by_timestamp
67+
required_capability: agg_first_last
68+
FROM k8s
69+
| EVAL network.cost = network.cost + null
70+
| STATS first_network_cost = FIRST(network.cost, @timestamp) BY pod
71+
| SORT pod ASC
72+
;
73+
74+
first_network_cost:double | pod:keyword
75+
null | one
76+
null | three
77+
null | two
78+
;

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,31 @@ ROW a = 100, @timestamp = "2025-01-01"::DATETIME
4848
LAST(a, @timestamp):integer
4949
100
5050
;
51+
52+
double_by_null
53+
required_capability: agg_first_last
54+
FROM k8s
55+
| EVAL @timestamp = @timestamp + null
56+
| STATS last_network_cost = LAST(network.cost, @timestamp) BY pod
57+
| SORT pod ASC
58+
;
59+
60+
last_network_cost:double | pod:keyword
61+
null | one
62+
null | three
63+
null | two
64+
;
65+
66+
double_by_null
67+
required_capability: agg_first_last
68+
FROM k8s
69+
| EVAL network.cost = network.cost + null
70+
| STATS last_network_cost = LAST(network.cost, @timestamp) BY pod
71+
| SORT pod ASC
72+
;
73+
74+
last_network_cost:double | pod:keyword
75+
null | one
76+
null | three
77+
null | two
78+
;

0 commit comments

Comments
 (0)