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] High-level AST APIs for the WHERE command #199998

Merged
merged 8 commits into from
Nov 28, 2024

Conversation

vadimkibana
Copy link
Contributor

@vadimkibana vadimkibana commented Nov 13, 2024

Summary

Partially addresses #191812

Implements high-level APIs for working with WHERE command.

  • commands.where.list() — lists all WHERE commands.
  • commands.where.byIndex() — finds the Nth WHERE command in the query.
  • commands.where.byField() — finds the first WHERE command which uses a specified field or a param.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@vadimkibana vadimkibana changed the title setup where command api [ES|QL] High-level AST APIs for the WHERE command Nov 13, 2024
@vadimkibana vadimkibana added review release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (8.x) 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 Nov 26, 2024
@vadimkibana vadimkibana marked this pull request as ready for review November 27, 2024 11:43
@vadimkibana vadimkibana requested a review from a team as a code owner November 27, 2024 11:43
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

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 216 222 +6

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.7KB
Unknown metric groups

API count

id before after diff
@kbn/esql-ast 277 283 +6

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! 👏

@vadimkibana vadimkibana merged commit 3e899e7 into elastic:main Nov 28, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

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

Partially addresses elastic#191812

Implements high-level APIs for working with `WHERE` command.

- `commands.where.list()` — lists all `WHERE` commands.
- `commands.where.byIndex()` — finds the Nth `WHERE` command in
the query.
- `commands.where.byField()` — finds the first `WHERE` command
which uses a specified field or a param.

### 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#_add_your_labels)

(cherry picked from commit 3e899e7)
@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 Nov 28, 2024
…199998) (#202110)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] High-level AST APIs for the `WHERE` command
(#199998)](#199998)

<!--- 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-11-28T09:14:50Z","message":"[ES|QL]
High-level AST APIs for the `WHERE` command (#199998)\n\n##
Summary\r\n\r\nPartially addresses
https://github.com/elastic/kibana/issues/191812\r\n\r\nImplements
high-level APIs for working with `WHERE` command.\r\n\r\n-
`commands.where.list()` &mdash; lists all `WHERE` commands.\r\n-
`commands.where.byIndex()` &mdash; finds the Nth `WHERE` command
in\r\nthe query.\r\n- `commands.where.byField()` &mdash; finds the first
`WHERE` command\r\nwhich uses a specified field or a
param.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\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\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"3e899e748e03000eef1712dd65e01d8fc6e99930","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]
High-level AST APIs for the `WHERE`
command","number":199998,"url":"https://github.com/elastic/kibana/pull/199998","mergeCommit":{"message":"[ES|QL]
High-level AST APIs for the `WHERE` command (#199998)\n\n##
Summary\r\n\r\nPartially addresses
https://github.com/elastic/kibana/issues/191812\r\n\r\nImplements
high-level APIs for working with `WHERE` command.\r\n\r\n-
`commands.where.list()` &mdash; lists all `WHERE` commands.\r\n-
`commands.where.byIndex()` &mdash; finds the Nth `WHERE` command
in\r\nthe query.\r\n- `commands.where.byField()` &mdash; finds the first
`WHERE` command\r\nwhich uses a specified field or a
param.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\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\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"3e899e748e03000eef1712dd65e01d8fc6e99930"}},"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/199998","number":199998,"mergeCommit":{"message":"[ES|QL]
High-level AST APIs for the `WHERE` command (#199998)\n\n##
Summary\r\n\r\nPartially addresses
https://github.com/elastic/kibana/issues/191812\r\n\r\nImplements
high-level APIs for working with `WHERE` command.\r\n\r\n-
`commands.where.list()` &mdash; lists all `WHERE` commands.\r\n-
`commands.where.byIndex()` &mdash; finds the Nth `WHERE` command
in\r\nthe query.\r\n- `commands.where.byField()` &mdash; finds the first
`WHERE` command\r\nwhich uses a specified field or a
param.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\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\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"3e899e748e03000eef1712dd65e01d8fc6e99930"}},{"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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) 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