[ES|QL] support SAMPLE command#221446
Conversation
|
Pinging @elastic/kibana-esql (Team:ESQL) |
There was a problem hiding this comment.
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 (?))
I see there are other places we suggest optional params such as here and I find it a very nice pattern

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.
...m/packages/shared/kbn-esql-validation-autocomplete/src/autocomplete/commands/sample/index.ts
Outdated
Show resolved
Hide resolved
...m/packages/shared/kbn-esql-validation-autocomplete/src/autocomplete/commands/sample/index.ts
Show resolved
Hide resolved
|
@stratoula I agree that making a suggestion for seed could help the user discover it. I'm just not sure whether any values for Perhaps I could provide an explanation in the suggestion itself. I'll look a bit more into this. |
|
@stratoula WDYT? Screen.Recording.2025-05-30.at.2.14.53.PM.mov |
stratoula
left a comment
There was a problem hiding this comment.
Looks great, I didnt test again, LGTM
|
Release note: skip as the feature is hidden and only available on snaphsot releases. |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Page load bundle
|
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15386080012 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Rerun when this #222023 is backported |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## 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)
# 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>
## 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>
## 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>
Summary
Closes #217977
Open questions
seed?Do the suggestions for sampling rate make sense?(approved)