Skip to content

[ES|QL] Add buckets param to Promql#253630

Merged
bartoval merged 5 commits intoelastic:mainfrom
bartoval:add_bucket_parameter
Feb 18, 2026
Merged

[ES|QL] Add buckets param to Promql#253630
bartoval merged 5 commits intoelastic:mainfrom
bartoval:add_bucket_parameter

Conversation

@bartoval
Copy link
Copy Markdown
Contributor

@bartoval bartoval commented Feb 18, 2026

Summary

part of #246728

We add a new param called buckets elastic/elasticsearch#142582

bucket.mp4

This change makes the following behavior explicit:

  • step is optional.
  • If step is not set, it is derived from buckets, start, and end. If buckets is not set, it defaults to 100.
  • If buckets is set (or start and end are set), we still pass step as next column.
  • Steps and buckets are mutually exclusive for validation and autocomplete (I added the video before implementing the autocomplete part)

@bartoval bartoval self-assigned this Feb 18, 2026
@bartoval bartoval added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// v9.4.0 labels Feb 18, 2026
@bartoval bartoval force-pushed the add_bucket_parameter branch from 3a0d230 to 3bdbe78 Compare February 18, 2026 06:44
@bartoval
Copy link
Copy Markdown
Contributor Author

Currently, end and start must be explicitly specified together with bucket. This will be resolved soon elastic/elasticsearch#142580, so I’m not adding additional validation checks in this PR.

Then we will be able to call Promql <query> directly

@felixbarny
Copy link
Copy Markdown
Member

Wow, that was quick. Thanks a lot for working on it. I watched the video and it looks great!

Just some nuance:

We add a new param called bucket

The parameter is called buckets (plural).

If bucket is not set, the value is derived from start and end.

I think this should be: If step is not set, it is derived from buckets, start, and end. If buckets is not set, it defaults to 100.

@bartoval bartoval force-pushed the add_bucket_parameter branch from 3bdbe78 to c364bc0 Compare February 18, 2026 06:58
@bartoval bartoval marked this pull request as ready for review February 18, 2026 07:20
@bartoval bartoval requested a review from a team as a code owner February 18, 2026 07:20
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

cc @bartoval

@bartoval bartoval changed the title [ES|QL] Add bucket param to Promql [ES|QL] Add buckets param to Promql Feb 18, 2026
Copy link
Copy Markdown
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

Super cute

…gistry/promql/autocomplete.ts

Co-authored-by: Stratou <stratoula1@gmail.com>
@bartoval bartoval merged commit 4b35161 into elastic:main Feb 18, 2026
16 checks passed
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Feb 19, 2026
## Summary
part of elastic#246728

We add a new param called `buckets
`elastic/elasticsearch#142582



https://github.com/user-attachments/assets/a3faa37e-5cd6-4b6e-bc1d-d5afa717c2ff



This change makes the following behavior explicit:

- step is optional.
- If step is not set, it is derived from buckets, start, and end. If
buckets is not set, it defaults to 100.
- If buckets is set (or start and end are set), we still pass step as
next column.
- Steps and buckets are mutually exclusive for validation and
autocomplete (I added the video before implementing the autocomplete
part)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratou <stratoula1@gmail.com>
ersin-erdal pushed a commit to ersin-erdal/kibana that referenced this pull request Feb 19, 2026
## Summary
part of elastic#246728

We add a new param called `buckets
`elastic/elasticsearch#142582



https://github.com/user-attachments/assets/a3faa37e-5cd6-4b6e-bc1d-d5afa717c2ff



This change makes the following behavior explicit:

- step is optional.
- If step is not set, it is derived from buckets, start, and end. If
buckets is not set, it defaults to 100.
- If buckets is set (or start and end are set), we still pass step as
next column.
- Steps and buckets are mutually exclusive for validation and
autocomplete (I added the video before implementing the autocomplete
part)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratou <stratoula1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:ESQL ES|QL related features in Kibana t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants