opensearch-project/observability

[BUG] Copying a table with hyphens from the Show Databases flyover does not add backquotes

Opened this issue · 1 comments

What is the bug?
This bug is related to direct query.

The LogExplorer for data sources has an option to "View databases and tables". Clicking this button opens a flyover where the ..

can be copied. When the db has hyphens in the name, backquotes are added to make it valid SQL syntax.

Example:
Database with name my-db becomes <backquote>my-db<backquote> (backquote = `)

The same behavior is not seen for tables with hyphens in the name

Example:
Table with name my-table does not get backquotes added when copying

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

  1. Create a Glue table with hyphens in the name
  2. Go to the LogExplorer page for a data source
  3. Open the "View databases and tables" flyover
  4. Copy the ..
from the button in the flyover
  • Paste the copied value to see no backquotes around the table name
  • What is the expected behavior?
    Table names with hyphens should be backquoted the same way database names with hyphens are

    What is your host/environment?

    • Version: 2.13

    Do you have any screenshots?
    image

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

    [Catch All Triage - 1, 2, 3, 4, 5]