Skip to content

ESQL: Add exponential_histogram support to AVG and SUM#138177

Merged
JonasKunz merged 7 commits intoelastic:mainfrom
JonasKunz:esql-exphisto-sum-avg
Nov 20, 2025
Merged

ESQL: Add exponential_histogram support to AVG and SUM#138177
JonasKunz merged 7 commits intoelastic:mainfrom
JonasKunz:esql-exphisto-sum-avg

Conversation

@JonasKunz
Copy link
Copy Markdown
Contributor

@JonasKunz JonasKunz commented Nov 17, 2025

Part of #137549.
There is still a TODO for AVG: For the edge case of empty histograms, this leads to 0.0 / 0.0, which in turn triggers a warning.
I plan on solving this in a follow up PR by changing SUM to be defined as null instead of 0.0 for empty histograms.

@elasticsearchmachine elasticsearchmachine added v9.3.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Nov 17, 2025
@JonasKunz JonasKunz force-pushed the esql-exphisto-sum-avg branch from 9c6f4c9 to 3e2ee1f Compare November 18, 2025 16:00
Stream.of(
MultiRowTestCaseSupplier.intCases(1, 1000, Integer.MIN_VALUE, Integer.MAX_VALUE, true),
MultiRowTestCaseSupplier.aggregateMetricDoubleCases(1, 1000, -Double.MAX_VALUE, Double.MAX_VALUE)
MultiRowTestCaseSupplier.aggregateMetricDoubleCases(1, 1000, -Double.MAX_VALUE, Double.MAX_VALUE),
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.

Info: This test made me notice that the unit tests unfortunately aren't that useful for surrogates, as we skip the evaluation for those.

Therefore we have to make sure that we really cover everything in the CSV tests.

@JonasKunz JonasKunz added the test-release Trigger CI checks against release build label Nov 19, 2025
@JonasKunz JonasKunz removed the test-release Trigger CI checks against release build label Nov 19, 2025
@JonasKunz JonasKunz marked this pull request as ready for review November 19, 2025 13:03
@JonasKunz JonasKunz requested a review from dnhatn November 19, 2025 13:03
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Nov 19, 2025
@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.

Looks great, thanks Jonas!

@JonasKunz JonasKunz merged commit 740ef90 into elastic:main Nov 20, 2025
34 checks passed
@JonasKunz JonasKunz deleted the esql-exphisto-sum-avg branch November 20, 2025 08:00
ncordon pushed a commit to ncordon/elasticsearch that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL 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.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants