From 22eca3a6f6410c7436f4a39d9bb1ff56c4bab957 Mon Sep 17 00:00:00 2001 From: Teddy Date: Mon, 5 Sep 2022 15:53:31 +0200 Subject: [PATCH] Fixes #7215 -- no bind for param (#7226) * Fix no bind for params * Update ingestion/src/metadata/orm_profiler/orm/functions/median.py Co-authored-by: Pere Miquel Brull Co-authored-by: Pere Miquel Brull --- ingestion/src/metadata/orm_profiler/orm/functions/median.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)