Skip to content

[ES|QL] Do not push sort on many keyword fields to lucene#142700

Merged
fang-xing-esql merged 10 commits intoelastic:mainfrom
fang-xing-esql:sort-many-fields
Feb 24, 2026
Merged

[ES|QL] Do not push sort on many keyword fields to lucene#142700
fang-xing-esql merged 10 commits intoelastic:mainfrom
fang-xing-esql:sort-many-fields

Conversation

@fang-xing-esql
Copy link
Copy Markdown
Member

@fang-xing-esql fang-xing-esql commented Feb 19, 2026

Resolves: #140134
Fixes: #141083

If the number of keyword sort keys exceeds esql.max_keyword_sort_fields (default: 10, defined in PlannerSettings), the sort is not pushed down to lucene and is deferred to the compute engine. Pushing down a sort with a large number of keyword fields can cause significant among of untracked memory during sorting and lead to OOM.

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @fang-xing-esql, I've created a changelog YAML for you.

@fang-xing-esql fang-xing-esql marked this pull request as ready for review February 23, 2026 13:26
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Feb 23, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @fang-xing-esql, I've updated the changelog YAML for you.

@fang-xing-esql fang-xing-esql merged commit 1c47db3 into elastic:main Feb 24, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0

Projects

None yet

3 participants