-
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
Escape non-alphanumeric fields for EQL #51443
Comments
Pinging @elastic/es-search (:Search/EQL) |
I've added the discuss label so we can tackle it on our next meeting. |
We decided in the 2020/03/19 weekly sync to stick with backticks. Closing. |
@rw-access I'm not sure you meant to close this? We should keep the issue open until we have made and merged the change/enhancement/feature. |
@colings86 we implemented and added tests for the backticks in #49658, but afterwards weren't 100% sure if that was the desired approach. we opened this issue to discuss and track what we decided. since we decided to keep the ` escaping `, I closed it |
Ah ok, that makes sense. Sorry for the confusion |
We need to add an escape sequence for fields that don't follow the typical IDENTIFIER regex:
[_A-Za-z0-9][_A-Za-z0-9]*
One thought, and currently in the #49658 PR is to use back ticks ` around special fields. I believe this is how MS SQL works, and we currently check for that syntax within the SQL plugin but mark it as unsupported:
elasticsearch/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlParser.java
Lines 161 to 169 in ec1ac0d
We should decide on an intuitive syntax that doesn't compete with single and double quotes.
The text was updated successfully, but these errors were encountered: