Skip to content

Commit 781244a

Browse files
ES|QL: Add note in Known Issues for #130644 (#130996)
1 parent d1cb7d6 commit 781244a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/reference/query-languages/esql/limitations.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,6 @@ Work around this limitation by converting the field to single value with one of
254254
* CSV export from Discover shows no more than 10,000 rows. This limit only applies to the number of rows that are retrieved by the query and displayed in Discover. Queries and aggregations run on the full data set.
255255
* Querying many indices at once without any filters can cause an error in kibana which looks like `[esql] > Unexpected error from Elasticsearch: The content length (536885793) is bigger than the maximum allowed string (536870888)`. The response from {{esql}} is too long. Use [`DROP`](/reference/query-languages/esql/commands/processing-commands.md#esql-drop) or [`KEEP`](/reference/query-languages/esql/commands/processing-commands.md#esql-keep) to limit the number of fields returned.
256256

257+
## Known issues [esql-known-issues]
258+
259+
Refer to [Known issues](/release-notes/known-issues.md) for a list of known issues for {{esql}}.

docs/release-notes/known-issues.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,12 @@ This issue will be fixed in a future patch release (see [PR #126990](https://git
3434
DELETE _index_template/.watches
3535
POST /_watcher/_start
3636
```
37+
38+
* 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).
39+
40+
The bug is described in detail in [this issue](https://github.com/elastic/elasticsearch/issues/130644).
41+
The problem was introduced in 8.16.0 and [fixed](https://github.com/elastic/elasticsearch/pull/130705) in 8.17.9, 8.18.7, 9.0.4.
42+
43+
Possible workarounds include:
44+
* switching the order of the grouping keys (eg. `STATS ... BY keyword2, keyword1`, if the `keyword2` has a lower cardinality)
45+
* reducing the grouping key cardinality, by filtering out values before STATS

0 commit comments

Comments
 (0)