dpgaspar commented on code in PR #28063: URL: https://github.com/apache/superset/pull/28063#discussion_r1570879847
########## superset/db_engine_specs/base.py: ########## @@ -1034,21 +1035,33 @@ def normalize_indexes(cls, indexes: list[dict[str, Any]]) -> list[dict[str, Any] return indexes @classmethod - def extra_table_metadata( # pylint: disable=unused-argument + def get_extra_table_metadata( # pylint: disable=unused-argument cls, database: Database, - table_name: str, - schema_name: str | None, + table: Table, ) -> dict[str, Any]: """ Returns engine-specific table metadata :param database: Database instance - :param table_name: Table name - :param schema_name: Schema name + :param table: A Table instance :return: Engine-specific table metadata """ - # TODO: Fix circular import caused by importing Database + # old method that doesn't work with catalogs + if hasattr(cls, "extra_table_metadata"): Review Comment: optional: do: ``` python if not hasattr(cls, "extra_table_metadata"): return {} ... ``` to reduce nesting -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org