@@ -149,18 +149,6 @@ constant_keyword:
149149 - match : {values.0.2: constant}
150150 - match : {values.0.3: wow such constant}
151151
152- - do :
153- allowed_warnings_regex :
154- - " No limit defined, adding default limit of \\ [.*\\ ]"
155- esql.query :
156- body :
157- query : ' from test | stats x = max(kind)'
158- - match : {columns.0.name: x}
159- - match : {columns.0.type: keyword}
160-
161- - length : {values: 1}
162- - match : {values.0.0: wow such constant}
163-
164152 - do :
165153 allowed_warnings_regex :
166154 - " No limit defined, adding default limit of \\ [.*\\ ]"
@@ -272,6 +260,70 @@ constant_keyword:
272260 - match : {values.1.1: "wow such constant"}
273261
274262
263+ ---
264+ constant_keyword_2 :
265+ - requires :
266+ test_runner_features : [capabilities]
267+ capabilities :
268+ - method : POST
269+ path : /_query
270+ parameters : []
271+ capabilities : [agg_max_min_string_support]
272+ reason : " Needs support for min/max aggs on keywords"
273+ - skip :
274+ features : warnings
275+ - do :
276+ indices.create :
277+ index : test
278+ body :
279+ mappings :
280+ properties :
281+ kind :
282+ type : constant_keyword
283+ value : wow such constant
284+ color :
285+ type : keyword
286+
287+ - do :
288+ bulk :
289+ index : test
290+ refresh : true
291+ body :
292+ - { "index": { } }
293+ - { "color": "red" }
294+
295+ - do :
296+ indices.create :
297+ index : text_test
298+ body :
299+ mappings :
300+ properties :
301+ kind :
302+ type : text
303+ color :
304+ type : keyword
305+
306+ - do :
307+ bulk :
308+ index : text_test
309+ refresh : true
310+ body :
311+ - { "index": { } }
312+ - { "kind":"a text field", "color": "green" }
313+
314+
315+ - do :
316+ allowed_warnings_regex :
317+ - " No limit defined, adding default limit of \\ [.*\\ ]"
318+ esql.query :
319+ body :
320+ query : ' from test | stats x = max(kind)'
321+ - match : {columns.0.name: x}
322+ - match : {columns.0.type: keyword}
323+
324+ - length : {values: 1}
325+ - match : {values.0.0: wow such constant}
326+
275327 - do :
276328 allowed_warnings_regex :
277329 - " No limit defined, adding default limit of \\ [.*\\ ]"
@@ -318,7 +370,6 @@ constant_keyword:
318370 - match : {values.1.0: red}
319371 - match : {values.1.1: "wow such constant"}
320372
321-
322373---
323374constant_keyword with null value :
324375 - do :
0 commit comments