-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Analytics/EQLEQL queryingEQL querying
Description
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
| @Override | |
| public void exitBackQuotedIdentifier(SqlBaseParser.BackQuotedIdentifierContext context) { | |
| Token token = context.BACKQUOTED_IDENTIFIER().getSymbol(); | |
| throw new ParsingException( | |
| "backquoted identifiers not supported; please use double quotes instead", | |
| null, | |
| token.getLine(), | |
| token.getCharPositionInLine()); | |
| } |
We should decide on an intuitive syntax that doesn't compete with single and double quotes.
Metadata
Metadata
Labels
:Analytics/EQLEQL queryingEQL querying