Skip to content

[ES|QL] support SAMPLE command#221446

Merged
stratoula merged 38 commits intoelastic:mainfrom
drewdaemon:217977/support-sample
Jun 2, 2025
Merged

[ES|QL] support SAMPLE command#221446
stratoula merged 38 commits intoelastic:mainfrom
drewdaemon:217977/support-sample

Conversation

@drewdaemon
Copy link
Contributor

@drewdaemon drewdaemon commented May 23, 2025

Summary

Closes #217977

Screenshot 2025-05-28 at 11 38 57 AM

Open questions

  • Should we be suggesting anything for seed?
  • Do the suggestions for sampling rate make sense? (approved)

@drewdaemon drewdaemon marked this pull request as ready for review May 28, 2025 20:13
@drewdaemon drewdaemon requested a review from a team as a code owner May 28, 2025 20:13
@elasticmachine
Copy link
Contributor

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

Copy link
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.

It looks great. 🙌 About your comment about the autocomplete in the seed, I was thinking of it and I think it makes sense to add some integer suggestions with the pipe here (maybe the ones we have for limit (?))

image

I see there are other places we suggest optional params such as here and I find it a very nice pattern
image

or in change_point

But happy to discuss further. I don't have a strong opinion and I don't consider it a blocker. I don't approve mostly for aligning on this.

@drewdaemon
Copy link
Contributor Author

@stratoula I agree that making a suggestion for seed could help the user discover it.

I'm just not sure whether any values for seed are actually meaningful. And if we suggest certain values, will that incorrectly imply that they are in some way special?

Perhaps I could provide an explanation in the suggestion itself. I'll look a bit more into this.

@drewdaemon
Copy link
Contributor Author

@stratoula WDYT?

Screen.Recording.2025-05-30.at.2.14.53.PM.mov

Copy link
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.

Looks great, I didnt test again, LGTM

@stratoula stratoula added release_note:enhancement release_note:skip Skip the PR/issue when compiling release notes and removed release_note:feature Makes this part of the condensed release notes release_note:enhancement labels Jun 2, 2025
@stratoula
Copy link
Contributor

Release note: skip as the feature is hidden and only available on snaphsot releases.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
esql 229 230 +1
lists 456 457 +1
securitySolution 7453 7454 +1
stackAlerts 283 284 +1
unifiedSearch 390 391 +1
total +5

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 3.7MB 3.7MB +822.0B

@stratoula stratoula merged commit 748638d into elastic:main Jun 2, 2025
16 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15386080012

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [ES|QL] Add support for RRF (#221349)

Manual backport

To create the backport manually run:

node scripts/backport --pr 221446

Questions ?

Please refer to the Backport tool documentation

@stratoula
Copy link
Contributor

Rerun when this #222023 is backported

@stratoula
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

stratoula added a commit to stratoula/kibana that referenced this pull request Jun 2, 2025
## Summary

Closes elastic#217977

<img width="820" alt="Screenshot 2025-05-28 at 11 38 57 AM"
src="https://github.com/user-attachments/assets/fcee1c7c-3c90-4d1d-9e10-0453a8c3307f"
/>

### Open questions
- Should we be suggesting anything for `seed`?
- ~Do the suggestions for sampling rate make sense?~ (approved)

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
(cherry picked from commit 748638d)
stratoula added a commit that referenced this pull request Jun 3, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[ES|QL] support `SAMPLE` command
(#221446)](#221446)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Drew
Tate","email":"drew.tate@elastic.co"},"sourceCommit":{"committedDate":"2025-06-02T07:09:40Z","message":"[ES|QL]
support `SAMPLE` command (#221446)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/217977\n\n<img width=\"820\"
alt=\"Screenshot 2025-05-28 at 11 38
57 AM\"\nsrc=\"https://github.com/user-attachments/assets/fcee1c7c-3c90-4d1d-9e10-0453a8c3307f\"\n/>\n\n###
Open questions\n- Should we be suggesting anything for `seed`?\n- ~Do
the suggestions for sampling rate make sense?~
(approved)\n\n---------\n\nCo-authored-by: Stratoula Kalafateli
<efstratia.kalafateli@elastic.co>","sha":"748638d4a93c667262badd91ce022ff1d90cbe7b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
support `SAMPLE`
command","number":221446,"url":"https://github.com/elastic/kibana/pull/221446","mergeCommit":{"message":"[ES|QL]
support `SAMPLE` command (#221446)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/217977\n\n<img width=\"820\"
alt=\"Screenshot 2025-05-28 at 11 38
57 AM\"\nsrc=\"https://github.com/user-attachments/assets/fcee1c7c-3c90-4d1d-9e10-0453a8c3307f\"\n/>\n\n###
Open questions\n- Should we be suggesting anything for `seed`?\n- ~Do
the suggestions for sampling rate make sense?~
(approved)\n\n---------\n\nCo-authored-by: Stratoula Kalafateli
<efstratia.kalafateli@elastic.co>","sha":"748638d4a93c667262badd91ce022ff1d90cbe7b"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221446","number":221446,"mergeCommit":{"message":"[ES|QL]
support `SAMPLE` command (#221446)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/217977\n\n<img width=\"820\"
alt=\"Screenshot 2025-05-28 at 11 38
57 AM\"\nsrc=\"https://github.com/user-attachments/assets/fcee1c7c-3c90-4d1d-9e10-0453a8c3307f\"\n/>\n\n###
Open questions\n- Should we be suggesting anything for `seed`?\n- ~Do
the suggestions for sampling rate make sense?~
(approved)\n\n---------\n\nCo-authored-by: Stratoula Kalafateli
<efstratia.kalafateli@elastic.co>","sha":"748638d4a93c667262badd91ce022ff1d90cbe7b"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Drew Tate <drew.tate@elastic.co>
zacharyparikh pushed a commit to zacharyparikh/kibana that referenced this pull request Jun 4, 2025
## Summary

Closes elastic#217977

<img width="820" alt="Screenshot 2025-05-28 at 11 38 57 AM"
src="https://github.com/user-attachments/assets/fcee1c7c-3c90-4d1d-9e10-0453a8c3307f"
/>

### Open questions
- Should we be suggesting anything for `seed`?
- ~Do the suggestions for sampling rate make sense?~ (approved)

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
## Summary

Closes elastic#217977

<img width="820" alt="Screenshot 2025-05-28 at 11 38 57 AM"
src="https://github.com/user-attachments/assets/fcee1c7c-3c90-4d1d-9e10-0453a8c3307f"
/>

### Open questions
- Should we be suggesting anything for `seed`?
- ~Do the suggestions for sampling rate make sense?~ (approved)

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels 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// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ES|QL] Supports SAMPLE command

4 participants