Skip to content

Commit b146496

Browse files
ES|QL: Add Known Issues note about STATS #130644
1 parent 46ec95b commit b146496

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/reference/release-notes/8.16.0.asciidoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,3 +517,12 @@ Snapshot/Restore::
517517
{esql}::
518518

519519
* Some valid queries using an `ENRICH` command can fail when a match field is used that is absent from some indices or shards, either with a 500 status code due to `NullPointerException` or `ClassCastException` or with a 400 status code and `IllegalArgumentException`. This is fixed in {es-pull}126187[#126187].
520+
521+
* A bug in STATS command may lead to wrong results. The bug only happens in a very specific case, ie. with `STATS ... BY keyword1, keyword2`:
522+
exactly two grouping fields, both keywords, where the first field has high cardinality (more than 65k distinct values).
523+
524+
The issue is described in detail in [this issue](https://github.com/elastic/elasticsearch/issues/130644).
525+
526+
Possible work-arounds are:
527+
* switching the order of the grouping keys (eg. `STATS ... BY keyword2, keyword1`, if the `keyword2` has a lower cardinality)
528+
* reducing the grouping key cardinality, filtering out values before STATS.

0 commit comments

Comments
 (0)