john-bodley commented on PR #26355:
URL: https://github.com/apache/superset/pull/26355#issuecomment-1874515788

   Thanks @Khrol for the PR. It seems—as in 
[this](https://github.com/apache/superset/blob/9033e72679fad7efdabc0f5b28607d974a7b5e1f/superset/db_engine_specs/bigquery.py#L322-L342)
 example—that the expected behavior for the `extra_table_metadata()` method is 
to return an empty dictionary if no indexes exist (assuming the underlying 
SQLAlchemy dialect returns an empty list as opposed to throwing a 
`NoSuchTableError` error.
   
   From a consistency standpoint—given that the [Trino Python 
client](https://github.com/trinodb/trino-python-client/blob/2a60ac97852ed567a65070e4fc823f673dadeaf8/trino/sqlalchemy/dialect.py#L296-L313)
 throws a  `NoSuchTableError` error whereas 
[PyHive](https://github.com/dropbox/PyHive/blob/d4ae481675ac5588ba9101596fa26f22ef0e77c4/pyhive/sqlalchemy_presto.py#L184-L205)
 likely returns an empty list—it seems like the preferred fix would be to 
augment the 
[`TrinoEngineSpec.extra_table_metadata()`](https://github.com/apache/superset/blob/9033e72679fad7efdabc0f5b28607d974a7b5e1f/superset/db_engine_specs/trino.py#L54C1-L101)
 method to handle the `NoSuchTableError` error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to