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

[BUG] legacy CSV endpoint throws error for SHOW tables LIKE % #1679

Open
joshuali925 opened this issue May 30, 2023 · 1 comment
Open

[BUG] legacy CSV endpoint throws error for SHOW tables LIKE % #1679

joshuali925 opened this issue May 30, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@joshuali925
Copy link
Member

What is the bug?

❯ curl -X POST -k -H 'Content-Type: application/json' localhost:9200/_plugins/_sql?format=csv -d '{"query":"SHOW tables LIKE %;"}'
Cannot invoke "org.opensearch.sql.legacy.executor.csv.CSVResult.getHeaders()" because "result" is null%

normal queries like select * from .kibana works fine on this endpoint

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

What is the expected behavior?
A clear and concise description of what you expected to happen.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

@joshuali925 joshuali925 added bug Something isn't working untriaged and removed untriaged labels May 30, 2023
@Yury-Fridlyand
Copy link
Collaborator

As of #1181, V2 accepts only quoted literals for system queries (SHOW and DESCRIBE). Probably you need to update your query @joshuali925.

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

2 participants