Skip to content

Commit 2ca5580

Browse files
[ES|QL] Update grammars (elastic#222142)
This PR updates the ES|QL grammars (lexer and parser) to match the latest version in Elasticsearch. --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
1 parent 9628845 commit 2ca5580

9 files changed

Lines changed: 532 additions & 463 deletions

File tree

src/platform/packages/shared/kbn-esql-ast/src/antlr/esql_parser.g4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ identifierOrParameter
189189
;
190190

191191
limitCommand
192-
: LIMIT INTEGER_LITERAL
192+
: LIMIT constant
193193
;
194194

195195
sortCommand
@@ -306,7 +306,7 @@ rrfCommand
306306
;
307307

308308
rerankCommand
309-
: DEV_RERANK queryText=constant ON rerankFields WITH inferenceId=identifierOrParameter
309+
: DEV_RERANK queryText=constant ON rerankFields (WITH inferenceId=identifierOrParameter)?
310310
;
311311

312312
completionCommand

src/platform/packages/shared/kbn-esql-ast/src/antlr/esql_parser.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)