Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better error messages on unexpected commands and improved comment syn…
…tax (#316) Resolves #287 `frm test` now produces ``` org.elasticsearch.xpack.esql.parser.ParsingException: line 1:1: mismatched input 'frm' expecting {'explain', 'from', 'row'} ``` and `from test | filter a > 10` produces ``` org.elasticsearch.xpack.esql.parser.ParsingException: line 1:13: mismatched input 'filter' expecting {'eval', 'stats', 'where', 'sort', 'limit', 'project'} ``` I also noticed that support for comments was somewhat inconsistent and queries like `from a//comment` or `from a/*comment*/` did not parse. Supporting single / in the source identifier in from is handy for supporting unquoted date math expressions as in`from <my-index-{now/d}>`.
- Loading branch information
Lukas Wegmann
committed
Nov 2, 2022
1 parent
fa10836
commit f86d6a9
Showing
9 changed files
with
512 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.interp
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.