Skip to content

Comments

[ES|QL] Improve binary expression grouping#225416

Merged
vadimkibana merged 13 commits intoelastic:mainfrom
vadimkibana:binary-expression-grouping-3
Jul 3, 2025
Merged

[ES|QL] Improve binary expression grouping#225416
vadimkibana merged 13 commits intoelastic:mainfrom
vadimkibana:binary-expression-grouping-3

Conversation

@vadimkibana
Copy link
Contributor

@vadimkibana vadimkibana commented Jun 26, 2025

Summary

Closes #224990

Also:

  • Improves binary expression grouping with () parenthesis in pretty-printer.
  • Updates binary expression precedence list.

Checklist

@vadimkibana
Copy link
Contributor Author

/ci

@vadimkibana vadimkibana marked this pull request as ready for review June 30, 2025 16:30
@vadimkibana vadimkibana requested a review from a team as a code owner June 30, 2025 16:30
@vadimkibana vadimkibana added review release_note:skip Skip the PR/issue when compiling release notes Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.2.0 labels Jun 30, 2025
@elasticmachine
Copy link
Contributor

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

@vadimkibana vadimkibana changed the title improve binary expression grouping [ES|QL] Improve binary expression grouping Jul 1, 2025
@vadimkibana vadimkibana requested a review from a team as a code owner July 1, 2025 12:34
@vadimkibana vadimkibana enabled auto-merge (squash) July 1, 2025 12:34
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.

This looks great! Tested it locally with various parenthesis combos and works as expected!

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@abhishekbhatia1710 abhishekbhatia1710 left a comment

Choose a reason for hiding this comment

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

LGTM 🚢 from entity-analytics. It’s just one file with a fixed import path and no implementation changes.

@vadimkibana vadimkibana merged commit 6d0dc4b into elastic:main Jul 3, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7787 7786 -1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/esql-ast 338 348 +10

Async chunks

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

id before after diff
securitySolution 9.8MB 9.8MB -1.0B

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 +413.0B
securitySolution 94.2KB 94.2KB -1.0B
total +412.0B
Unknown metric groups

API count

id before after diff
@kbn/esql-ast 419 429 +10

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 3, 2025
## Summary

Closes elastic#224990

Also:

- Improves binary expression grouping with `()` parenthesis in
pretty-printer.
- Updates binary expression precedence list.

### Checklist

- [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 6d0dc4b)
@kibanamachine
Copy link
Contributor

kibanamachine added a commit that referenced this pull request Jul 3, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[ES|QL] Improve binary expression grouping
(#225416)](#225416)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Vadim
Kibana","email":"82822460+vadimkibana@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-03T10:03:00Z","message":"[ES|QL]
Improve binary expression grouping (#225416)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/224990\n\nAlso:\n\n- Improves
binary expression grouping with `()` parenthesis in\npretty-printer.\n-
Updates binary expression precedence list.\n\n\n### Checklist\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"6d0dc4bcf7d8ed90a8634832a2aaa6b1683fc7fb","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[ES|QL]
Improve binary expression
grouping","number":225416,"url":"https://github.com/elastic/kibana/pull/225416","mergeCommit":{"message":"[ES|QL]
Improve binary expression grouping (#225416)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/224990\n\nAlso:\n\n- Improves
binary expression grouping with `()` parenthesis in\npretty-printer.\n-
Updates binary expression precedence list.\n\n\n### Checklist\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"6d0dc4bcf7d8ed90a8634832a2aaa6b1683fc7fb"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225416","number":225416,"mergeCommit":{"message":"[ES|QL]
Improve binary expression grouping (#225416)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/224990\n\nAlso:\n\n- Improves
binary expression grouping with `()` parenthesis in\npretty-printer.\n-
Updates binary expression precedence list.\n\n\n### Checklist\n\n- [x]
[Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"6d0dc4bcf7d8ed90a8634832a2aaa6b1683fc7fb"}}]}]
BACKPORT-->

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

Closes elastic#224990

Also:

- Improves binary expression grouping with `()` parenthesis in
pretty-printer.
- Updates binary expression precedence list.


### Checklist

- [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: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 review Team:ESQL ES|QL related features in Kibana t// v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ES|QL] Prettifier removes parenthesis

5 participants