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

[ES|QL] Improve the Builder class #203558

Merged
merged 5 commits into from
Dec 13, 2024
Merged

Conversation

vadimkibana
Copy link
Contributor

@vadimkibana vadimkibana commented Dec 10, 2024

Summary

Partially addresses #202113

  • Makes sure it is possible to construct any AST using the Builder class
  • Fixes few bugs in pretty-printer
    • No space is added before unary - or + expression, for example, -123.
    • Source cluster is now printed cluster:my_index

Checklist

@vadimkibana vadimkibana added review release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana v8.18.0 labels Dec 10, 2024
@vadimkibana vadimkibana requested a review from a team as a code owner December 10, 2024 12:43
@elasticmachine
Copy link
Contributor

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

@vadimkibana vadimkibana enabled auto-merge (squash) December 12, 2024 11:45
auto-merge was automatically disabled December 12, 2024 12:58

Head branch was pushed to by a user without write access

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #14 / Entity Manager _search API includes source and additional metadata fields

Metrics [docs]

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.5MB 3.5MB +1.2KB

History

@vadimkibana vadimkibana merged commit 8904cb0 into elastic:main Dec 13, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 13, 2024
## Summary

Partially addresses elastic#202113

- Makes sure it is possible to construct any AST using the `Builder`
class
- Fixes few bugs in pretty-printer
- No space is added before unary `-` or `+` expression, for example,
`-123`.
  - Source cluster is now printed `cluster:my_index`

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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

(cherry picked from commit 8904cb0)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 13, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Improve the `Builder` class
(#203558)](#203558)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Vadim
Kibana","email":"82822460+vadimkibana@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-12-13T15:19:10Z","message":"[ES|QL]
Improve the `Builder` class (#203558)\n\n## Summary\r\n\r\nPartially
addresses https://github.com/elastic/kibana/issues/202113\r\n\r\n- Makes
sure it is possible to construct any AST using the
`Builder`\r\nclass\r\n- Fixes few bugs in pretty-printer\r\n- No space
is added before unary `-` or `+` expression, for example,\r\n`-123`.\r\n
- Source cluster is now printed `cluster:my_index` \r\n\r\n\r\n###
Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8904cb068cf6140f6cc4a8db5cde2524a4fa2240","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL","v8.18.0"],"title":"[ES|QL]
Improve the `Builder`
class","number":203558,"url":"https://github.com/elastic/kibana/pull/203558","mergeCommit":{"message":"[ES|QL]
Improve the `Builder` class (#203558)\n\n## Summary\r\n\r\nPartially
addresses https://github.com/elastic/kibana/issues/202113\r\n\r\n- Makes
sure it is possible to construct any AST using the
`Builder`\r\nclass\r\n- Fixes few bugs in pretty-printer\r\n- No space
is added before unary `-` or `+` expression, for example,\r\n`-123`.\r\n
- Source cluster is now printed `cluster:my_index` \r\n\r\n\r\n###
Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8904cb068cf6140f6cc4a8db5cde2524a4fa2240"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203558","number":203558,"mergeCommit":{"message":"[ES|QL]
Improve the `Builder` class (#203558)\n\n## Summary\r\n\r\nPartially
addresses https://github.com/elastic/kibana/issues/202113\r\n\r\n- Makes
sure it is possible to construct any AST using the
`Builder`\r\nclass\r\n- Fixes few bugs in pretty-printer\r\n- No space
is added before unary `-` or `+` expression, for example,\r\n`-123`.\r\n
- Source cluster is now printed `cluster:my_index` \r\n\r\n\r\n###
Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"8904cb068cf6140f6cc4a8db5cde2524a4fa2240"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
## Summary

Partially addresses elastic#202113

- Makes sure it is possible to construct any AST using the `Builder`
class
- Fixes few bugs in pretty-printer
- No space is added before unary `-` or `+` expression, for example,
`-123`.
  - Source cluster is now printed `cluster:my_index` 


### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes review Team:ESQL ES|QL related features in Kibana v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants