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] Nested quoted column identifer parsing #189913

Closed
2 tasks
vadimkibana opened this issue Aug 5, 2024 · 3 comments · Fixed by #190612
Closed
2 tasks

[ES|QL] Nested quoted column identifer parsing #189913

vadimkibana opened this issue Aug 5, 2024 · 3 comments · Fixed by #190612
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:ES|QL ES|QL related features in Kibana impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:ESQL ES|QL related features in Kibana

Comments

@vadimkibana
Copy link
Contributor

vadimkibana commented Aug 5, 2024

ES|QL grammar allows to quote each part of a column identifier separately, for example below kept column:

FROM index | KEEP `a`.`b`

is equivalent to simply a.b unquoted column:

FROM index | KEEP a.b

But is not equivalent to:

FROM index | KEEP `a.b`

What needs to be done:

  • Bug: ES|QL parser currently keeps the inner backticks as part of the column name: a`.`b.
  • Parse out a list of identifiers.

In our column node type, we need to introduce a list of column identifiers:

{
  type: 'column',
  parts: ['a', 'b'],
}
@vadimkibana vadimkibana added the bug Fixes for quality problems that affect the customer experience label Aug 5, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 5, 2024
@vadimkibana vadimkibana added Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana labels Aug 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 5, 2024
@stratoula stratoula added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Aug 6, 2024
@stratoula
Copy link
Contributor

Removing the Discovery team as this is on the ESQL team codebase

@vadimkibana vadimkibana self-assigned this Aug 14, 2024
vadimkibana added a commit that referenced this issue Aug 20, 2024
## Summary

Fixes #189913

- Adds `parts` field to `{ type: 'column' }` AST nodes. The `parts`
field contains a list of correctly parsed out column framents.
- The existing `text` and `name` fields work only if a column does not
have any escaped characters. However, I could not change/remove them, as
lots of code is currently referring them.


### 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#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:ES|QL ES|QL related features in Kibana impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:ESQL ES|QL related features in Kibana
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants