Skip to content

Commit 1b00c47

Browse files
committed
Disallow mixed quoted/unquoted patterns in FROM
1 parent d546fc8 commit 1b00c47

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,21 @@ indexPatternAndMetadataFields:
108108
;
109109

110110
indexPattern
111-
: (clusterString COLON)? indexString
112-
| indexString (CAST_OP selectorString)?
111+
: clusterString COLON unquotedIndexString
112+
| unquotedIndexString CAST_OP selectorString
113+
| indexString
113114
;
114115

115116
clusterString
116117
: UNQUOTED_SOURCE
117-
| QUOTED_STRING
118118
;
119119

120120
selectorString
121121
: UNQUOTED_SOURCE
122-
| QUOTED_STRING
122+
;
123+
124+
unquotedIndexString
125+
: UNQUOTED_SOURCE
123126
;
124127

125128
indexString

0 commit comments

Comments
 (0)