Skip to content

Implement queryDSL percentiles for exponential_histogram#141818

Merged
JonasKunz merged 6 commits intoelastic:mainfrom
JonasKunz:exphisto-quierydsl-percentile-impl
Feb 5, 2026
Merged

Implement queryDSL percentiles for exponential_histogram#141818
JonasKunz merged 6 commits intoelastic:mainfrom
JonasKunz:exphisto-quierydsl-percentile-impl

Conversation

@JonasKunz
Copy link
Copy Markdown
Contributor

@JonasKunz JonasKunz commented Feb 4, 2026

Part of #135625.

Adds support for the "percentiles" agg, which includes support for querying mixed exponential_histogram / T-Digest data.
In addition this PR also adds a missing test for the "histogram" agg, which was already added in 9.3.

The tests are randomized. I've run them several 10k times without failures, so they hopefully should not introduce flakes.

@elasticsearchmachine elasticsearchmachine added v9.4.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Feb 4, 2026
return wrap(otherState.breaker, TDigestState.createUsingParamsFrom(otherState.tDigestState));
} else {
return createWithEmptyTDigest(otherState.breaker, otherState.tdigestInitParams, otherState.exponentialHistogramState);
return createWithEmptyTDigest(otherState.breaker, otherState.tdigestInitParams, null);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was a bug which was fortunately caught by the newly added aggregation unit tests.
I've also added dedicated tests in HistogramUnionState for this now.

@JonasKunz JonasKunz marked this pull request as ready for review February 4, 2026 14:17
@JonasKunz JonasKunz requested a review from martijnvg February 4, 2026 14:17
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Feb 4, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@JonasKunz JonasKunz merged commit b16fa65 into elastic:main Feb 5, 2026
35 checks passed
@JonasKunz JonasKunz deleted the exphisto-quierydsl-percentile-impl branch February 5, 2026 08:35
mamazzol pushed a commit to mamazzol/elasticsearch that referenced this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations external-contributor Pull request authored by a developer outside the Elasticsearch team >non-issue 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