mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix: silence deprecation warnings causing noisy production logs (#38128)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1183,10 +1183,11 @@ class Database(CoreDatabase, AuditMixinNullable, ImportExportMixin): # pylint:
|
||||
|
||||
def has_table(self, table: Table) -> bool:
|
||||
with self.get_sqla_engine(catalog=table.catalog, schema=table.schema) as engine:
|
||||
inspector = sqla.inspect(engine)
|
||||
# do not pass "" as an empty schema; force null
|
||||
if engine.has_table(table.table, table.schema or None):
|
||||
if inspector.has_table(table.table, table.schema or None):
|
||||
return True
|
||||
return engine.has_table(table.table.lower(), table.schema or None)
|
||||
return inspector.has_table(table.table.lower(), table.schema or None)
|
||||
|
||||
def has_view(self, table: Table) -> bool:
|
||||
with self.get_sqla_engine(catalog=table.catalog, schema=table.schema) as engine:
|
||||
|
||||
Reference in New Issue
Block a user