-
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] Query with UNION operator fails with NullPointerException #2540
Comments
could u share the index mapping.
|
@penghuo error occurs for me following same mapping you have used, but without the '?format=csv' query parameter at the end of the POST call, but my understanding is this shouldn't be necessary and a response should be returned without it as expected.
However, when adding the '?format=csv' query string a response is returned as expected:
|
Just to clarify, I see this only seems to be an issue with the default format (JDBC), and with 'raw' format. A response is returned when using the 'format query parameter' to state the response format should be JSON or csv. |
Currently, the UNION statement is implemented in legacy engine(v1). It's a bug in legacy engine(v1). |
What is the bug?
Present in OpenSearch 2.12.0, 2.11.0, 1.3.10
The documentation states that Union queries are supported. However, when attempting a simple union query, the request fails with:
{ "error": { "reason": "There was internal problem at backend", "details": "", "type": "NullPointerException" }, "status": 500 }
The query returns the expected result when ?format=csv is added to the request URL.
How can one reproduce the bug?
Steps to reproduce the behavior:
{ "query": "SELECT title FROM novels UNION SELECT title FROM songs" }
What is the expected behavior?
Union operator to work as expected. In above example adding the request call to be ''http://localhost:9200/_plugins/_sql?format=csv" returns:
What is your host/environment?
Present in OpenSearch 2.12, 2.11 and 1.3.10
Do you have any screenshots?
Error:
As expected (When adding ?format=csv to request URL):
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: