Skip to content

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

Open
@joshuali925

Description

@joshuali925

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions