teragrep / pth_03

Data Processing Language (DPL) parser
GNU Affero General Public License v3.0
0 stars 4 forks source link

timechart doesn't throw an exception with invalid input #27

Open 51-code opened 5 months ago

51-code commented 5 months ago

Describe the bug

The following query doesn't throw an exception: index=xyz | timechart count test1 test2 test3 123 Same happens when using the BY clause and then typing invalid input afterwards.

Good thing is that this doesn't really break the execution of the commands before the invalid input. The query is executed properly, it just ignores the invalid input. If any other commands or parameters are written after the invalid input, they are also ignored.

Expected behavior

Should throw an error when encountering invalid input. In the example "test1" is the first invalid word.

How to reproduce

Run the query.

Screenshots

Software version

PTH-03: 5.4.0

Desktop (please complete the following information if relevant):

Additional context

The lexer properly classifies the found tokens. The parser stops building the parse tree when it encounters the first piece of invalid input, but it doesn't throw an error.