-
Notifications
You must be signed in to change notification settings - Fork 141
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
[BUG] GROUP BY Missing field returns error #743
Comments
@deathjoin Thanks for reporting the issue. Will investigate and update! |
After investigation, the root cause turns out that TYPE is reversed keyword in relevancy search function argument name: https://github.com/opensearch-project/sql/blob/main/sql/src/main/antlr/OpenSearchSQLParser.g4#L434. There are 2 workarounds as below: Workaround-1: Use other field name
Workaround-2: Quote keyword field name
|
For permanent improvement, I think common keywords like TYPE should be allowed to use as identifier. This can be done by adding it here: https://github.com/opensearch-project/sql/blob/main/sql/src/main/antlr/OpenSearchSQLIdentifierParser.g4#L60. |
@dai-chen @Yury-Fridlyand Re-tagging this issue to 2.4.0 release. |
Removing 2.4.0 tag. As @Yury-Fridlyand pointed out, this may be fixed along with other bug together. |
What is the bug?
When doing
GROUP BY
field that is missing in some documents OS returns errorHow can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
I expect missing field would be treated like
null
and response would beWhat is your host/environment?
Do you have any screenshots?
No
Do you have any additional context?
When selecting without group by value returned as null:
Response:
Also node logs:
The text was updated successfully, but these errors were encountered: