Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] More AST mutation APIs (#196240)](#196240) <!--- 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-10-15T15:45:03Z","message":"[ES|QL] More AST mutation APIs (#196240)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/191812\r\n\r\nImplements the following high-level ES|QL AST manipulation methods:\r\n\r\n\r\n- `.generic`\r\n- `.appendCommandArgument()` — Add a new main command argument to\r\na command.\r\n- `.removeCommandArgument()` — Remove a command argument from the\r\nAST.\r\n- `.commands`\r\n - `.from`\r\n - `.sources`\r\n - `.list()` — List all `FROM` sources.\r\n - `.find()` — Find a source by name.\r\n - `.remove()` — Remove a source by name.\r\n - `.insert()` — Insert a source.\r\n - `.upsert()` — Insert a source, if it does not exist.\r\n - `.limit`\r\n - `.list()` — List all `LIMIT` commands.\r\n - `.byIndex()` — Find a `LIMIT` command by index.\r\n - `.find()` — Find a `LIMIT` command by a predicate function.\r\n - `.remove()` — Remove a `LIMIT` command by index.\r\n- `.set()` — Set the limit value of a specific `LIMIT` command.\r\n- `.upsert()` — Insert a `LIMIT` command, or update the limit\r\nvalue if it already exists.\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]\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\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":"10364fba2db8bb2080a97173c76a9d1aef1e80ed","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.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.16.0"],"title":"[ES|QL] More AST mutation APIs","number":196240,"url":"https://github.com/elastic/kibana/pull/196240","mergeCommit":{"message":"[ES|QL] More AST mutation APIs (#196240)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/191812\r\n\r\nImplements the following high-level ES|QL AST manipulation methods:\r\n\r\n\r\n- `.generic`\r\n- `.appendCommandArgument()` — Add a new main command argument to\r\na command.\r\n- `.removeCommandArgument()` — Remove a command argument from the\r\nAST.\r\n- `.commands`\r\n - `.from`\r\n - `.sources`\r\n - `.list()` — List all `FROM` sources.\r\n - `.find()` — Find a source by name.\r\n - `.remove()` — Remove a source by name.\r\n - `.insert()` — Insert a source.\r\n - `.upsert()` — Insert a source, if it does not exist.\r\n - `.limit`\r\n - `.list()` — List all `LIMIT` commands.\r\n - `.byIndex()` — Find a `LIMIT` command by index.\r\n - `.find()` — Find a `LIMIT` command by a predicate function.\r\n - `.remove()` — Remove a `LIMIT` command by index.\r\n- `.set()` — Set the limit value of a specific `LIMIT` command.\r\n- `.upsert()` — Insert a `LIMIT` command, or update the limit\r\nvalue if it already exists.\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]\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\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":"10364fba2db8bb2080a97173c76a9d1aef1e80ed"}},"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/196240","number":196240,"mergeCommit":{"message":"[ES|QL] More AST mutation APIs (#196240)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/191812\r\n\r\nImplements the following high-level ES|QL AST manipulation methods:\r\n\r\n\r\n- `.generic`\r\n- `.appendCommandArgument()` — Add a new main command argument to\r\na command.\r\n- `.removeCommandArgument()` — Remove a command argument from the\r\nAST.\r\n- `.commands`\r\n - `.from`\r\n - `.sources`\r\n - `.list()` — List all `FROM` sources.\r\n - `.find()` — Find a source by name.\r\n - `.remove()` — Remove a source by name.\r\n - `.insert()` — Insert a source.\r\n - `.upsert()` — Insert a source, if it does not exist.\r\n - `.limit`\r\n - `.list()` — List all `LIMIT` commands.\r\n - `.byIndex()` — Find a `LIMIT` command by index.\r\n - `.find()` — Find a `LIMIT` command by a predicate function.\r\n - `.remove()` — Remove a `LIMIT` command by index.\r\n- `.set()` — Set the limit value of a specific `LIMIT` command.\r\n- `.upsert()` — Insert a `LIMIT` command, or update the limit\r\nvalue if it already exists.\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]\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\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":"10364fba2db8bb2080a97173c76a9d1aef1e80ed"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com>
- Loading branch information