mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 19:18:05 +00:00
Remove unique computation for unsupported fields (#7117)
This commit is contained in:
parent
41a04c462e
commit
891603e72f
@ -18,6 +18,7 @@ from sqlalchemy import column, func
|
||||
from sqlalchemy.orm import DeclarativeMeta, Session
|
||||
|
||||
from metadata.orm_profiler.metrics.core import QueryMetric
|
||||
from metadata.orm_profiler.orm.registry import NOT_COMPUTE
|
||||
|
||||
|
||||
class UniqueCount(QueryMetric):
|
||||
@ -46,6 +47,9 @@ class UniqueCount(QueryMetric):
|
||||
"We are missing the session attribute to compute the UniqueCount."
|
||||
)
|
||||
|
||||
if self.col.type.__class__ in NOT_COMPUTE:
|
||||
return None
|
||||
|
||||
# Run all queries on top of the sampled data
|
||||
col = column(self.col.name)
|
||||
only_once = (
|
||||
|
||||
@ -290,11 +290,6 @@ class Profiler(Generic[TMetric]):
|
||||
|
||||
def _prepare_column_metrics_for_thread_pool(self):
|
||||
"""prepare column metrics for thread pool"""
|
||||
window_metrics = [
|
||||
metric
|
||||
for metric in self.get_col_metrics(self.static_metrics)
|
||||
if metric.is_window_metric()
|
||||
]
|
||||
columns = [
|
||||
column
|
||||
for column in self.columns
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user