Skip to content
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

[8.x] [ES|QL] Implement `OrderExpression` for `SORT` command arguments (#189959) #193379

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…stic#189959)

## Summary

Closes elastic#189491

- Adds *order expression* AST nodes, which are minted from `SORT`
command.
- Improves SORT command autocomplete suggestions.

Shows fields on first space:

<img width="791" alt="image"
src="https://github.com/user-attachments/assets/3fec96b4-4e61-4212-a856-ace7a33d9755">

It now shows `NULLS FIRST` and `NULLS LAST`, even before `ASC` or `DESC`
was entered, as `ASC` and `DESC` are optional:

<img width="871" alt="image"
src="https://github.com/user-attachments/assets/4b6d6c28-a7b0-4ac0-bafc-133df1207d54">

Once `ASC` or `DESC` is entered, shows only nulls options:

<img width="911" alt="image"
src="https://github.com/user-attachments/assets/5b27bd3d-ccdc-4bd0-b09f-fe65e5975e28">

It also now suggests partial modifier, if the in-progress text that user
is typing matches it:

<img width="504" alt="image"
src="https://github.com/user-attachments/assets/9a047c40-b49b-4694-8477-7270cb9c0886">

(However, we are not triggering autocomplete in those cases in UI, so no
way to see it in UI right now.)

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 2efd0f0)
@drewdaemon
Copy link
Contributor

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5814 5815 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 20.4MB 20.4MB +645.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/esql-ast 31 20 -11

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.4MB 3.4MB +2.6KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @vadimkibana

@kibanamachine kibanamachine merged commit 8bd6e11 into elastic:8.x Sep 23, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants