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

Open
wants to merge 5 commits into
base: 8.19
Choose a base branch
from

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 from f006c21 to bbd98ec Compare June 18, 2025 12:50
jan-elastic and others added 5 commits June 18, 2025 16:11
* 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 <[email protected]>
* Fix memory tracking of ES|QL sample agg

* [CI] Auto commit changes from spotless

* polish code

---------

Co-authored-by: elasticsearchmachine <[email protected]>
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 28be95b to 0517520 Compare June 18, 2025 14:11
@jan-elastic jan-elastic requested a review from ivancea June 18, 2025 15:22
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.

2 participants