Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.11] [ES|QL] fixes getIndexPatternFromESQLQuery for comma separated…
… indices (elastic#169562) (elastic#169624) # Backport This will backport the following commits from `main` to `8.11`: - [[ES|QL] fixes getIndexPatternFromESQLQuery for comma separated indices (elastic#169562)](elastic#169562) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Vitalii Dmyterko","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-24T10:13:48Z","message":"[ES|QL] fixes getIndexPatternFromESQLQuery for comma separated indices (elastic#169562)\n\n## Summary\r\n\r\nComma separated source indices work as expected with ES|QL query, but\r\n`getIndexPatternFromESQLQuery` does not parses it correctly. This small\r\nPR is an attempt to fix this behavior\r\n\r\n### Before\r\n\r\n```ts\r\n const idxPattern7 = getIndexPatternFromESQLQuery('from foo-1, foo-2 | limit 2');\r\n expect(idxPattern7).toBe('foo-1,');\r\n```\r\n\r\n### After\r\n```ts\r\n const idxPattern7 = getIndexPatternFromESQLQuery('from foo-1, foo-2 | limit 2');\r\n expect(idxPattern7).toBe('foo-1, foo-2');\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\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"7112690e8e88307b75a5420b41d489847d36fce9","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","backport:prev-minor","v8.11.0","Feature:ES|QL","v8.12.0"],"number":169562,"url":"https://github.com/elastic/kibana/pull/169562","mergeCommit":{"message":"[ES|QL] fixes getIndexPatternFromESQLQuery for comma separated indices (elastic#169562)\n\n## Summary\r\n\r\nComma separated source indices work as expected with ES|QL query, but\r\n`getIndexPatternFromESQLQuery` does not parses it correctly. This small\r\nPR is an attempt to fix this behavior\r\n\r\n### Before\r\n\r\n```ts\r\n const idxPattern7 = getIndexPatternFromESQLQuery('from foo-1, foo-2 | limit 2');\r\n expect(idxPattern7).toBe('foo-1,');\r\n```\r\n\r\n### After\r\n```ts\r\n const idxPattern7 = getIndexPatternFromESQLQuery('from foo-1, foo-2 | limit 2');\r\n expect(idxPattern7).toBe('foo-1, foo-2');\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\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"7112690e8e88307b75a5420b41d489847d36fce9"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169562","number":169562,"mergeCommit":{"message":"[ES|QL] fixes getIndexPatternFromESQLQuery for comma separated indices (elastic#169562)\n\n## Summary\r\n\r\nComma separated source indices work as expected with ES|QL query, but\r\n`getIndexPatternFromESQLQuery` does not parses it correctly. This small\r\nPR is an attempt to fix this behavior\r\n\r\n### Before\r\n\r\n```ts\r\n const idxPattern7 = getIndexPatternFromESQLQuery('from foo-1, foo-2 | limit 2');\r\n expect(idxPattern7).toBe('foo-1,');\r\n```\r\n\r\n### After\r\n```ts\r\n const idxPattern7 = getIndexPatternFromESQLQuery('from foo-1, foo-2 | limit 2');\r\n expect(idxPattern7).toBe('foo-1, foo-2');\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\nCo-authored-by: Stratoula Kalafateli <[email protected]>","sha":"7112690e8e88307b75a5420b41d489847d36fce9"}}]}] BACKPORT--> Co-authored-by: Vitalii Dmyterko <[email protected]>
- Loading branch information