-
Notifications
You must be signed in to change notification settings - Fork 30
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 Workbench: Semicolon in SQL strings terminates query #243
Comments
@opensearch-project/admin can this issue be moved to https://github.com/opensearch-project/dashboards-query-workbench, please? Thanks! |
@smacrakis This may be the expected behaviour, where workbench tries to run multiple queries in UI and these queries are separated with semi-colon.
|
Sample data is not needed. The SQL query << select "foo" >> correctly returns the value << foo >>. OpenSearch SQL does not support backticks for quoting strings. Entering the query << select OpenSearch SQL allows doublequote (") and singlequote (') for quoting strings. But Query Workbench doesn't understand that semicolons within quoted strings do not separate SQL queries: << select 'foo;bar' >> => error How can I enter a string including a semicolon in Query Workbench? |
Was able to reproduce the issue:
This is due to the way workbench is built to run multiple queries at a time. It supports multiple queries to be run which are separated by Action Item: Update split queries by checking if the |
Describe the bug
In the Query Workbench, the SQL query << select "foo;bar" >> gives an error because it is segmenting the query at the semicolon, even though the semicolon is within a quoted string.
The problem is with Query Workbench since submitting the query using POST /_plugins/_sql works fine.
Tested on https://playground.opensearch.org/app/home
Related component
Other
To Reproduce
Go to https://playground.opensearch.org/app/opensearch-query-workbench#/ .
Enter the query
select "foo;bar"
Run.
See the errors:
It is strange that it capitalizes "Bar" in the error message....
Expected behavior
There should be one result row
foo;bar
with no error.
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: