Superset should include catalog in the request to Trino's `system.metadata.table_comments` table
alec-heif opened this issue · comments
See issue title
How to reproduce the bug
- Add a Trino Database that has a specific catalog with connection string
trino://{username}:{password}@{hostname}:{port}/{my_catalog}
- Attempt to add a Dataset with a schema and table name that exist in
my_catalog
. Let's saymy_schema
andmy_table
- Look at the queries made to Trino.
Expected results
Superset should make a query like
SELECT "comment"
FROM "system"."metadata"."table_comments"
WHERE "schema_name" = 'my_schema'
AND "table_name" = 'my_table'
AND "catalog_name" = 'my_catalog'
Actual results
Superset makes a query like
SELECT "comment"
FROM "system"."metadata"."table_comments"
WHERE "schema_name" = 'my_schema'
AND "table_name" = 'my_table'
which will erroneously include results for ALL catalogs that have a matching schema and table name.
Environment
- superset version: latest
Checklist
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven't found one similar.
@john-bodley do you know of anyone who would be a good fit to take a look at this one?
Closing this as stale since it's been silent for so long, and we're trying to steer toward a more actionable Issues backlog. If people are still encountering this in current versions (currently 3.x) please open a new Issue or a PR to address the problem.
CC @bkyryliuk @nytai @villebro in case any of you feel differently and want to repro/reopen this.