Fix Redshift profiler for external tables in Redshift Spectrum (#18182)

This commit is contained in:
devanshGarg-lumiq 2024-10-09 16:28:57 +05:30 committed by GitHub
parent e21843b752
commit fcd34afab5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -412,7 +412,7 @@ class RedshiftTableMetricComputer(BaseTableMetricComputer):
) )
res = self.runner._session.execute(query).first() res = self.runner._session.execute(query).first()
if not res: if not res:
return None return super().compute()
if res.rowCount is None or ( if res.rowCount is None or (
res.rowCount == 0 and self._entity.tableType == TableType.View res.rowCount == 0 and self._entity.tableType == TableType.View
): ):