Skip to content

ESQL: Opt into dupes when filtering#142088

Merged
nik9000 merged 3 commits intoelastic:mainfrom
nik9000:esql_filter_may_dupes
Feb 9, 2026
Merged

ESQL: Opt into dupes when filtering#142088
nik9000 merged 3 commits intoelastic:mainfrom
nik9000:esql_filter_may_dupes

Conversation

@nik9000
Copy link
Copy Markdown
Member

@nik9000 nik9000 commented Feb 8, 2026

As of #142055 we track when DocVector contains duplicates. In that PR we said "if you call filter, then the result may contain duplicates." This PR adds a flag to filter saying "the result of this filter may contain duplicates." It's quite common for filter calls not to create duplicates and most callers can pass false. That'll allow block loaders that follow these filter calls to use faster paths.

As of elastic#142055 we track when `DocVector` contains duplicates. In that PR
we said "if you call `filter`, then the result may contain duplicates."
This PR adds a flag to `filter` saying "the result of this `filter` may
contain duplicates." It's quite common for `filter` calls not to create
duplicates and most callers can pass `false`. That'll allow block
loaders that follow these `filter` calls to use faster paths.
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Feb 8, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you!

@nik9000 nik9000 merged commit 126b33f into elastic:main Feb 9, 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 >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants