Skip to content

Handle new aggregation range types Pythonically #2860

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

Conversation

miguelgrinberg
Copy link
Contributor

@miguelgrinberg miguelgrinberg commented Mar 27, 2025

This change makes the DSL code generator work with the new aggregation range types introduced in elastic/elasticsearch-specification#2725. Basically this change makes the generator ignore these types and use a manually added one in wrappers.py, exactly like ranges are handled for queries.

In addition, I have changed the way the DSL generator determines which version of the schema to use, because the main branch reports 8.17.2 as current version. With this change we are using the git branch instead of the version reported in the code. And some schema changes that are unrelated to aggregation ranges are also included.

@miguelgrinberg miguelgrinberg changed the title Handle new aggregation range types Pythoncally Handle new aggregation range types Pythonically Mar 27, 2025
@miguelgrinberg miguelgrinberg force-pushed the aggregation-ranges-change branch 3 times, most recently from a142b43 to 70ecf89 Compare March 28, 2025 12:32
@miguelgrinberg miguelgrinberg force-pushed the aggregation-ranges-change branch from 70ecf89 to 50cd220 Compare March 28, 2025 16:23
@miguelgrinberg miguelgrinberg marked this pull request as ready for review March 28, 2025 16:59
@miguelgrinberg miguelgrinberg requested a review from pquentin March 28, 2025 16:59
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

@miguelgrinberg miguelgrinberg merged commit a224f49 into elastic:main Mar 31, 2025
13 checks passed
@miguelgrinberg miguelgrinberg deleted the aggregation-ranges-change branch March 31, 2025 09:08
github-actions bot pushed a commit that referenced this pull request Mar 31, 2025
miguelgrinberg added a commit that referenced this pull request Apr 1, 2025
(cherry picked from commit a224f49)

Co-authored-by: Miguel Grinberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants