trinodb / trino-python-client

Python client for Trino
Apache License 2.0
311 stars 154 forks source link

SQLAlchemy `get_table_comment` can return incorrect results or hang #217

Closed dungdm93 closed 1 year ago

dungdm93 commented 1 year ago

There are 2 issue with current implementation of get_table_comment in SQLAlchemy dialect

  1. The query select from "system"."metadata"."table_comments" but not specify catalog_name that can lead to wrong result if Trino has 2 tables with the same name & schema but in different catalogs. image
  2. The query will be hang if one of the connector is not connected. Demo: I shutdown PostgreSQL and get comment of actor table in MySQL catalog. image