Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/reference/esql/esql-limitations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,17 @@ the <<esql-mv-functions,multivalue functions>>.
=== Kibana limitations

include::esql-kibana.asciidoc[tag=limitations]

[discrete]
[[esql-known-issues]]
== Known issues

A bug in the ES|QL STATS command may yield incorrect results. The bug only happens in very specific cases that follow this pattern: `STATS ... BY keyword1, keyword2`, i.e. the command must have exactly two grouping fields, both keywords, where the first field has high cardinality (more than 65k distinct values).

The bug is described in detail in [this issue](https://github.com/elastic/elasticsearch/issues/130644).
The problem was introduced in 8.16.0 and [fixed](https://github.com/elastic/elasticsearch/pull/130705) in 8.17.9, 8.18.7.

Possible workarounds include:
* switching the order of the grouping keys (eg. `STATS ... BY keyword2, keyword1`, if the `keyword2` has a lower cardinality)
* reducing the grouping key cardinality, by filtering out values before STATS

10 changes: 10 additions & 0 deletions docs/reference/release-notes/8.16.0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,13 @@ Snapshot/Restore::
{esql}::

* 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].

* A bug in the ES|QL STATS command may yield incorrect results. The bug only happens in very specific cases that follow this pattern: `STATS ... BY keyword1, keyword2`, i.e. the command must have exactly two grouping fields, both keywords, where the first field has high cardinality (more than 65k distinct values).

The bug is described in detail in [this issue](https://github.com/elastic/elasticsearch/issues/130644).
The problem was introduced in 8.16.0 and [fixed](https://github.com/elastic/elasticsearch/pull/130705) in 8.17.9, 8.18.7.

Possible workarounds include:
* switching the order of the grouping keys (eg. `STATS ... BY keyword2, keyword1`, if the `keyword2` has a lower cardinality)
* reducing the grouping key cardinality, by filtering out values before STATS