2121 type : long
2222 count :
2323 type : integer
24+ message :
25+ type : keyword
2426
2527---
2628" Basic ESQL usage output (telemetry) snapshot version " :
@@ -65,11 +67,16 @@ setup:
6567 - set : {esql.functions.cos: functions_cos}
6668 - set : {esql.functions.to_long: functions_to_long}
6769 - set : {esql.functions.coalesce: functions_coalesce}
70+ - set : {esql.functions.categorize: functions_categorize}
6871
6972 - do :
7073 esql.query :
7174 body :
72- query : ' from test | where data > 2 and to_long(data) > 2 | sort count desc | limit 5 | stats m = max(data)'
75+ query : ' from test
76+ | where data > 2 and to_long(data) > 2
77+ | sort count desc
78+ | limit 5
79+ | stats m = max(data) by categorize(message)'
7380
7481 - do : {xpack.usage: {}}
7582 - match : { esql.available: true }
9299 - match : {esql.functions.cos: $functions_cos}
93100 - gt : {esql.functions.to_long: $functions_to_long}
94101 - match : {esql.functions.coalesce: $functions_coalesce}
102+ - gt : {esql.functions.categorize: $functions_categorize}
95103 # Testing for the entire function set isn't feasbile, so we just check that we return the correct count as an approximation.
96104 - length : {esql.functions: 134} # check the "sister" test below for a likely update to the same esql.functions length check
97105
@@ -137,11 +145,16 @@ setup:
137145 - set : {esql.functions.cos: functions_cos}
138146 - set : {esql.functions.to_long: functions_to_long}
139147 - set : {esql.functions.coalesce: functions_coalesce}
148+ - set : {esql.functions.categorize: functions_categorize}
140149
141150 - do :
142151 esql.query :
143152 body :
144- query : ' from test | where data > 2 and to_long(data) > 2 | sort count desc | limit 5 | stats m = max(data)'
153+ query : ' from test
154+ | where data > 2 and to_long(data) > 2
155+ | sort count desc
156+ | limit 5
157+ | stats m = max(data) by categorize(message)'
145158
146159 - do : {xpack.usage: {}}
147160 - match : { esql.available: true }
@@ -164,4 +177,5 @@ setup:
164177 - match : {esql.functions.cos: $functions_cos}
165178 - gt : {esql.functions.to_long: $functions_to_long}
166179 - match : {esql.functions.coalesce: $functions_coalesce}
180+ - gt : {esql.functions.categorize: $functions_categorize}
167181 - length : {esql.functions: 131} # check the "sister" test above for a likely update to the same esql.functions length check
0 commit comments