diff --git a/ingestion/src/metadata/orm_profiler/orm/functions/median.py b/ingestion/src/metadata/orm_profiler/orm/functions/median.py index c7c9d2419d3..7c859cd97fd 100644 --- a/ingestion/src/metadata/orm_profiler/orm/functions/median.py +++ b/ingestion/src/metadata/orm_profiler/orm/functions/median.py @@ -30,8 +30,8 @@ class MedianFn(FunctionElement): @compiles(MedianFn) def _(elements, compiler, **kwargs): - col, _ = [compiler.process(element, **kwargs) for element in elements.clauses] - return "percentile_cont(0.5) WITHIN GROUP (ORDER BY %s ASC)" % col + col = elements.clauses.clauses[0].name + return "percentile_cont(0.5) WITHIN GROUP (ORDER BY %s ASC)" % col @compiles(MedianFn, Dialects.BigQuery)