Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tstats command can't parse where parameter #48

Open
51-code opened this issue Jul 30, 2024 · 0 comments
Open

Tstats command can't parse where parameter #48

51-code opened this issue Jul 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@51-code
Copy link
Contributor

51-code commented Jul 30, 2024

Describe the bug

There is a test case for a query:
| tstats prestats=f append=true count where host=y BY foobar

which results to the error:

line 46:49 mismatched input 'y' expecting {PIPE, WILDCARD, GET_STRING_WILDCARD, GET_STRING_SINGLE_QUOTED, GET_STRING_DOUBLE_QUOTED, GET_STRING_STRING, COMMAND_TSTATS_MODE_BY}

The parsing is therefore stopped when reaching the "y" token. In the parse tree it can be seen that it is actually parsed as a <GET_FIELD_STRING>, which doesn't match the expected tokens.

Expected behavior

Should parse the "y" as a StringType and continue to the by instruction.

How to reproduce

Test the query above.

Screenshots

Software version

6.1.0

Desktop (please complete the following information if relevant):

  • OS:
  • Browser:
  • Version:

Additional context

tstatsSyntaxParseTest in TstatsSyntaxTests.java has been disabled because of this issue in PR #52.

@51-code 51-code added the bug Something isn't working label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant