Skip to content

Commit 8b6db54

Browse files
add metadata in subquery tests
1 parent a38f6b9 commit 8b6db54

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

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

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ subqueryInFromWithWhereInSubquery
5252
required_capability: fork_v9
5353
required_capability: subquery_in_from_command
5454

55-
FROM employees, (FROM sample_data
55+
FROM employees, (FROM sample_data metadata _index
5656
| WHERE client_ip == "172.21.3.15" )
5757
metadata _index
5858
| WHERE ( emp_no >= 10091 AND emp_no < 10094) OR emp_no IS NULL
@@ -64,17 +64,17 @@ _index:keyword | emp_no:integer | languages:integer | client_ip:ip
6464
employees | 10091 | 3 | null
6565
employees | 10092 | 1 | null
6666
employees | 10093 | 3 | null
67-
null | null | null | 172.21.3.15
68-
null | null | null | 172.21.3.15
69-
null | null | null | 172.21.3.15
70-
null | null | null | 172.21.3.15
67+
sample_data | null | null | 172.21.3.15
68+
sample_data | null | null | 172.21.3.15
69+
sample_data | null | null | 172.21.3.15
70+
sample_data | null | null | 172.21.3.15
7171
;
7272

7373
subqueryInFromWithStatsInSubquery
7474
required_capability: fork_v9
7575
required_capability: subquery_in_from_command
7676

77-
FROM employees, (FROM sample_data
77+
FROM employees, (FROM sample_data metadata _index
7878
| STATS cnt = count(*) by client_ip )
7979
metadata _index
8080
| WHERE ( emp_no >= 10091 AND emp_no < 10094) OR emp_no IS NULL
@@ -140,9 +140,9 @@ required_capability: fork_v9
140140
required_capability: subquery_in_from_command
141141

142142
FROM sample_data, sample_data_str,
143-
(FROM sample_data_ts_nanos
143+
(FROM sample_data_ts_nanos metadata _index
144144
| WHERE client_ip == "172.21.3.15") ,
145-
(FROM sample_data_ts_long
145+
(FROM sample_data_ts_long metadata _index
146146
| EVAL @timestamp = @timestamp::date_nanos
147147
| WHERE client_ip == "172.21.0.5")
148148
metadata _index
@@ -152,23 +152,23 @@ FROM sample_data, sample_data_str,
152152
;
153153

154154
cnt:long | _index:keyword | client_ip:ip
155-
1 | sample_data | 172.21.0.5
156-
1 | sample_data | 172.21.2.113
157-
1 | sample_data | 172.21.2.162
158-
4 | sample_data | 172.21.3.15
159-
1 | sample_data_str | 172.21.0.5
160-
1 | sample_data_str | 172.21.2.113
161-
1 | sample_data_str | 172.21.2.162
162-
4 | sample_data_str | 172.21.3.15
163-
1 | null | 172.21.0.5
164-
4 | null | 172.21.3.15
155+
1 | sample_data | 172.21.0.5
156+
1 | sample_data | 172.21.2.113
157+
1 | sample_data | 172.21.2.162
158+
4 | sample_data | 172.21.3.15
159+
1 | sample_data_str | 172.21.0.5
160+
1 | sample_data_str | 172.21.2.113
161+
1 | sample_data_str | 172.21.2.162
162+
4 | sample_data_str | 172.21.3.15
163+
1 | sample_data_ts_long | 172.21.0.5
164+
4 | sample_data_ts_nanos | 172.21.3.15
165165
;
166166

167167
subqueryInFromWithLookupJoinInSubquery
168168
required_capability: fork_v9
169169
required_capability: subquery_in_from_command
170170

171-
FROM employees, (FROM sample_data
171+
FROM employees, (FROM sample_data metadata _index
172172
| EVAL client_ip = client_ip::keyword
173173
| LOOKUP JOIN clientips_lookup ON client_ip )
174174
metadata _index
@@ -181,20 +181,20 @@ _index:keyword | emp_no:integer | languages:integer | client_ip:keyword | env:ke
181181
employees | 10091 | 3 | null | null
182182
employees | 10092 | 1 | null | null
183183
employees | 10093 | 3 | null | null
184-
null | null | null | 172.21.0.5 | Development
185-
null | null | null | 172.21.2.113 | QA
186-
null | null | null | 172.21.2.162 | QA
187-
null | null | null | 172.21.3.15 | Production
188-
null | null | null | 172.21.3.15 | Production
189-
null | null | null | 172.21.3.15 | Production
190-
null | null | null | 172.21.3.15 | Production
184+
sample_data | null | null | 172.21.0.5 | Development
185+
sample_data | null | null | 172.21.2.113 | QA
186+
sample_data | null | null | 172.21.2.162 | QA
187+
sample_data | null | null | 172.21.3.15 | Production
188+
sample_data | null | null | 172.21.3.15 | Production
189+
sample_data | null | null | 172.21.3.15 | Production
190+
sample_data | null | null | 172.21.3.15 | Production
191191
;
192192

193193
subqueryInFromWithLookupJoinInMainQuery
194194
required_capability: fork_v9
195195
required_capability: subquery_in_from_command
196196

197-
FROM employees, (FROM sample_data
197+
FROM employees, (FROM sample_data metadata _index
198198
| EVAL client_ip = client_ip::keyword )
199199
metadata _index
200200
| WHERE ( emp_no >= 10091 AND emp_no < 10094) OR emp_no IS NULL
@@ -207,13 +207,13 @@ _index:keyword | emp_no:integer | languages:integer | client_ip:keyword | env:ke
207207
employees | 10091 | 3 | null | null
208208
employees | 10092 | 1 | null | null
209209
employees | 10093 | 3 | null | null
210-
null | null | null | 172.21.0.5 | Development
211-
null | null | null | 172.21.2.113 | QA
212-
null | null | null | 172.21.2.162 | QA
213-
null | null | null | 172.21.3.15 | Production
214-
null | null | null | 172.21.3.15 | Production
215-
null | null | null | 172.21.3.15 | Production
216-
null | null | null | 172.21.3.15 | Production
210+
sample_data | null | null | 172.21.0.5 | Development
211+
sample_data | null | null | 172.21.2.113 | QA
212+
sample_data | null | null | 172.21.2.162 | QA
213+
sample_data | null | null | 172.21.3.15 | Production
214+
sample_data | null | null | 172.21.3.15 | Production
215+
sample_data | null | null | 172.21.3.15 | Production
216+
sample_data | null | null | 172.21.3.15 | Production
217217
;
218218

219219
subqueryInFromWithEnrichInSubquery

0 commit comments

Comments
 (0)