-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
EQL: Replace [`] with ['] for identifiers #62638
Conversation
Since `'` is no longer supported for defining string literals, we replace the backquote [`] with single quote ['] for the definition of identifiers. The backquote is not a commonly used symbol in languages and many times, especially with some fonts, can easily be mistaken and cause confusion. Relates to elastic#61659
Pinging @elastic/es-ql (:Query Languages/EQL) |
The error message for the removal of /cc @rw-access |
@@ -191,14 +191,12 @@ PIPE: '|'; | |||
|
|||
|
|||
ESCAPED_IDENTIFIER | |||
: '`' (~'`')* '`' | |||
: '\'' (~'`')* '\'' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't agreed on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't merge until we reach an agreement. Related note:in this PR as well: #62539 (review).
Also EQL in Elasticsearch is experimental, but EQL for Endgame is not. For EQL in Endgame users migrating to Elasticsearch, this is would make this not only a breaking change, but a quiet one, since existing syntax is assigned new purpose.
@rw-access I agree with you, since there is no way (grammar-wise) to keep both the error message for the single quotes around strings and their new usage around identifiers. Personally, I'd keep the next release with the prohibition of single quotes and introduce the new usage in the release after that. |
Let me add some more thoughts.
This doesn't seem as a dangerous behaviour since it doesn't lead to a correct query with wrong behaviour. On the other hand, for me it seems quite inconvenient for the user to receive a message mentioning a wrong identifier for something that until now it was considered a string literal. To conclude, if we think that the percentage of users/queries affected is rather low, and since ES-EQL is experimental, doesn't seem so impactful. Imho though, I have a preference over the more clear 2 step approach (1. error message for single quotes around string, 2. replacement of backquotes with single quote for identifiers). |
Based on @astefan 's comment here: #62650 (comment) |
This PR can be closed without merging (see #62663 (comment)). |
Closing this, see comments above and on the relevant issue: #62539 |
Since
'
is no longer supported for defining string literals,we replace the backquote [`] with single quote ['] for the definition of
identifiers. The backquote is not a commonly used symbol in languages
and many times, especially with some fonts, can easily be mistaken and
cause confusion.
Closes: #62539