Skip to content

[ES|QL] fix suggestions after triple quote pair#221200

Merged
drewdaemon merged 29 commits intoelastic:mainfrom
drewdaemon:221073/wrong-suggestions-after-stats-where
May 22, 2025
Merged

[ES|QL] fix suggestions after triple quote pair#221200
drewdaemon merged 29 commits intoelastic:mainfrom
drewdaemon:221073/wrong-suggestions-after-stats-where

Conversation

@drewdaemon
Copy link
Contributor

@drewdaemon drewdaemon commented May 21, 2025

Summary

fix #221073

Checklist

Comment on lines -719 to +724
if (substr === openBracket) {
stack.push(substr);
break;
} else if (pairsReversed[substr] && pairsReversed[substr] === stack[stack.length - 1]) {
if (pairsReversed[substr] && pairsReversed[substr] === stack[stack.length - 1]) {
stack.pop();
break;
} else if (substr === openBracket) {
stack.push(substr);
break;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This needed to be reversed. """ is a symmetric token (both opening and closing) so the algo needs to check whether one has already been seen at the corresponding level to know how to interpret it.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@drewdaemon drewdaemon added release_note:fix Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// v9.1.0 v8.19.0 backport:version Backport to applied version labels labels May 22, 2025
@drewdaemon drewdaemon marked this pull request as ready for review May 22, 2025 13:50
@drewdaemon drewdaemon requested a review from a team as a code owner May 22, 2025 13:50
@elasticmachine
Copy link
Contributor

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

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.

awesome, LGTM

@drewdaemon drewdaemon merged commit 933bff1 into elastic:main May 22, 2025
24 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

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

fix elastic#221073

### 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 933bff1)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

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 May 22, 2025
…1273)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ES|QL] fix suggestions after triple quote pair
(#221200)](#221200)

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

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

<!--BACKPORT [{"author":{"name":"Drew
Tate","email":"drew.tate@elastic.co"},"sourceCommit":{"committedDate":"2025-05-22T14:59:24Z","message":"[ES|QL]
fix suggestions after triple quote pair (#221200)\n\n## Summary\n\nfix
https://github.com/elastic/kibana/issues/221073\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":"933bff12a601fcb4868e0c76f002ff381b4234cc","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
fix suggestions after triple quote
pair","number":221200,"url":"https://github.com/elastic/kibana/pull/221200","mergeCommit":{"message":"[ES|QL]
fix suggestions after triple quote pair (#221200)\n\n## Summary\n\nfix
https://github.com/elastic/kibana/issues/221073\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":"933bff12a601fcb4868e0c76f002ff381b4234cc"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221200","number":221200,"mergeCommit":{"message":"[ES|QL]
fix suggestions after triple quote pair (#221200)\n\n## Summary\n\nfix
https://github.com/elastic/kibana/issues/221073\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":"933bff12a601fcb4868e0c76f002ff381b4234cc"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Drew Tate <drew.tate@elastic.co>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
## Summary

fix elastic#221073


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

4 participants