Skip to content

[8.19] Backport ES|QL sample agg function #129627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 19, 2025

Conversation

jan-elastic
Copy link
Contributor

No description provided.

@jan-elastic jan-elastic added :ml Machine learning backport Team:ML Meta label for the ML team v8.19.0 labels Jun 18, 2025
Copy link
Contributor

Documentation preview:

@jan-elastic jan-elastic force-pushed the backport-esql-sample-agg-8.19 branch 2 times, most recently from 28be95b to 0517520 Compare June 18, 2025 14:11
@jan-elastic jan-elastic requested a review from ivancea June 18, 2025 15:22
jan-elastic and others added 5 commits June 19, 2025 10:23
* ES|QL SAMPLE aggregation function

* [CI] Auto commit changes from spotless

* ThreadLocalRandom -> SplittableRandom

* Update docs/changelog/127629.yaml

* fix yaml test

* Add SampleTests

* docs + example

* polish code

* mark generated imports

* comment with algorith description

* use Randomness.get()

* close properly

* type checks

* reuse hash

* regen some files

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
* Fix memory tracking of ES|QL sample agg

* [CI] Auto commit changes from spotless

* polish code

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
This removes a ton of the tricky juggling we do for generated java files
to keep the imports in order. Instead, we just live with them being out
of order a little. It's not great, but it's so so so much easier than
the terrible juggling we had been doing.
This builds the infrastructure to disable spotless and some checkstyle
rules on generated imports. This works around the most frustrating part
of ESQL's string template generated files - the imports. It allows
unused and out of order imports. This can let us remove a lot of
cumbersome, tricky, and fairly useless `$if$` blocks from the templates.
@jan-elastic jan-elastic force-pushed the backport-esql-sample-agg-8.19 branch from 0517520 to 2e1815d Compare June 19, 2025 08:24
@jan-elastic jan-elastic merged commit 2db9127 into elastic:8.19 Jun 19, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :ml Machine learning Team:ML Meta label for the ML team v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants