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
…5936) # Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Improve variable and field name handling (#195149)](#195149) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Drew Tate","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-11T14:33:04Z","message":"[ES|QL] Improve variable and field name handling (#195149)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/191111\r\nCloses https://github.com/elastic/kibana/issues/191105\r\n\r\nThis change cleans up the way variables and fields were being stored and\r\nchecked against. We now populate the field and variable cache with\r\nunescaped column names. This means that there are fewer cache misses\r\nbecause of escaped names checked against unescaped/differently-escaped\r\nnames.\r\n\r\nIt also introduces a [suite of\r\ntests](https://github.com/elastic/kibana/pull/195149/files#diff-6e4802e45f72257ca6f765bedd3ad65d2cbb587adb5befadb5f27ad5ab08a5a6R113)\r\nfor variable type detection. Most of those tests are currently skipped,\r\nbut they are there to represent what should happen when we resolve\r\nhttps://github.com//issues/195682\r\n\r\nUser-facing improvements\r\n- Validation used to fail for field names with multiple escaped parts\r\n(e.g. `geo`.`dest`)\r\n- https://github.com/elastic/kibana/issues/191105\r\n- Variables assigned the result of an inline cast used to get the wrong\r\ntype.\r\n- Escaped field/variable suggestions now work with field list\r\nautocomplete\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2162f392-3ac3-4bb4-bf37-c73318c7f751\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"731c4e4aabbacfdc36ae44bce3e10f438b55a4cd","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL"],"title":"[ES|QL] Improve variable and field name handling","number":195149,"url":"https://github.com/elastic/kibana/pull/195149","mergeCommit":{"message":"[ES|QL] Improve variable and field name handling (#195149)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/191111\r\nCloses https://github.com/elastic/kibana/issues/191105\r\n\r\nThis change cleans up the way variables and fields were being stored and\r\nchecked against. We now populate the field and variable cache with\r\nunescaped column names. This means that there are fewer cache misses\r\nbecause of escaped names checked against unescaped/differently-escaped\r\nnames.\r\n\r\nIt also introduces a [suite of\r\ntests](https://github.com/elastic/kibana/pull/195149/files#diff-6e4802e45f72257ca6f765bedd3ad65d2cbb587adb5befadb5f27ad5ab08a5a6R113)\r\nfor variable type detection. Most of those tests are currently skipped,\r\nbut they are there to represent what should happen when we resolve\r\nhttps://github.com//issues/195682\r\n\r\nUser-facing improvements\r\n- Validation used to fail for field names with multiple escaped parts\r\n(e.g. `geo`.`dest`)\r\n- https://github.com/elastic/kibana/issues/191105\r\n- Variables assigned the result of an inline cast used to get the wrong\r\ntype.\r\n- Escaped field/variable suggestions now work with field list\r\nautocomplete\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2162f392-3ac3-4bb4-bf37-c73318c7f751\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"731c4e4aabbacfdc36ae44bce3e10f438b55a4cd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195149","number":195149,"mergeCommit":{"message":"[ES|QL] Improve variable and field name handling (#195149)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/191111\r\nCloses https://github.com/elastic/kibana/issues/191105\r\n\r\nThis change cleans up the way variables and fields were being stored and\r\nchecked against. We now populate the field and variable cache with\r\nunescaped column names. This means that there are fewer cache misses\r\nbecause of escaped names checked against unescaped/differently-escaped\r\nnames.\r\n\r\nIt also introduces a [suite of\r\ntests](https://github.com/elastic/kibana/pull/195149/files#diff-6e4802e45f72257ca6f765bedd3ad65d2cbb587adb5befadb5f27ad5ab08a5a6R113)\r\nfor variable type detection. Most of those tests are currently skipped,\r\nbut they are there to represent what should happen when we resolve\r\nhttps://github.com//issues/195682\r\n\r\nUser-facing improvements\r\n- Validation used to fail for field names with multiple escaped parts\r\n(e.g. `geo`.`dest`)\r\n- https://github.com/elastic/kibana/issues/191105\r\n- Variables assigned the result of an inline cast used to get the wrong\r\ntype.\r\n- Escaped field/variable suggestions now work with field list\r\nautocomplete\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2162f392-3ac3-4bb4-bf37-c73318c7f751\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"731c4e4aabbacfdc36ae44bce3e10f438b55a4cd"}}]}] BACKPORT--> Co-authored-by: Drew Tate <[email protected]>
- Loading branch information