opensearch-project / opensearch-project/sql
[BUG] Cardinality aggregate query failed with Data too large for [<reused_arrays>]
Open
@LantaoJin is already working on this.
Since Nov 20, 2025.
bug
clickbench
dependencies
PPL
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
What is the bug?
Q14 (and its plan) failed with
"details": "Shard[0]: CircuitBreakingException[[parent] Data too large, data for [<reused_arrays>] would be [16322276464/15.2gb], which is larger than the limit of [16320875724/15.1gb], real usage: [16322260080/15.2gb], new bytes reserved: [16384/16kb], usages [request=3405779072/3.1gb, fielddata=182331967/173.8mb, in_flight_requests=272/272b]]
The DSL query failed either
{
"from": 0,
"size": 0,
"timeout": "1m",
"query": {
"bool": {
"must": [
{
"exists": {
"field": "SearchPhrase",
"boost": 1
}
}
],
"must_not": [
{
"term": {
"SearchPhrase": {
"value": "",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"aggregations": {
"SearchPhrase": {
"terms": {
"field": "SearchPhrase",
"size": 10,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"u": "desc"
},
{
"_key": "asc"
}
]
},
"aggregations": {
"u": {
"cardinality": {
"field": "UserID"
}
}
}
}
}
}
This issue is OpenSearch Core related, cannot be fixed within SQL plugin
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.