apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform

Home Page:https://superset.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Add a Trino Database that has a specific catalog with connection string trino://{username}:{password}@{hostname}:{port}/{my_catalog}
  2. Attempt to add a Dataset with a schema and table name that exist in my_catalog. Let's say my_schema and my_table
  3. 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?

commented

is this bug the reason for the behavior noted in #21745 ?

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.