Skip to content

Commit 5e91ec0

Browse files
authored
Fix parsing exception when PromQL has a trailing space (#138736)
closes #138675
1 parent 49858d1 commit 5e91ec0

File tree

4 files changed

+365
-360
lines changed

4 files changed

+365
-360
lines changed

x-pack/plugin/esql/src/main/antlr/lexer/Promql.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ PROMQL_NESTED_LP
4545

4646
// Query text - everything except parens and special characters
4747
PROMQL_QUERY_TEXT
48-
: ( PROMQL_STRING_LITERAL | PROMQL_QUERY_COMMENT | ~[|()"'`#\r\n] )+ // Exclude both ( and ) from text
48+
: ( PROMQL_STRING_LITERAL | PROMQL_QUERY_COMMENT | ~[|()"'`#\r\n ] )+ // Exclude both ( and ) from text
4949
;
5050
5151
// String literals (preserved with quotes as part of text)

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)