-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make CATEGORIZE csv test deterministic
- Loading branch information
1 parent
942d799
commit 0c93423
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
12 changes: 7 additions & 5 deletions
12
x-pack/plugin/esql/qa/testFixtures/src/main/resources/categorize.csv-spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
categorize | ||
required_capability: categorize | ||
|
||
# Drop the category ID, because it's non-deterministic | ||
FROM sample_data | ||
| STATS count=COUNT(), values=VALUES(message) BY category=CATEGORIZE(message) | ||
| STATS count=COUNT(), values=MV_SORT(VALUES(message)) BY category=CATEGORIZE(message) | ||
| SORT count DESC, category ASC | ||
| DROP category | ||
; | ||
|
||
count:long | values:keyword | category:integer | ||
3 | [Connected to 10.1.0.1, Connected to 10.1.0.2, Connected to 10.1.0.3] | 0 | ||
3 | [Connection error] | 1 | ||
1 | [Disconnected] | 2 | ||
count:long | values:keyword | ||
3 | [Connected to 10.1.0.1, Connected to 10.1.0.2, Connected to 10.1.0.3] | ||
3 | [Connection error] | ||
1 | [Disconnected] | ||
; |