From eb1550205a68eb664e226f725b45f035f232e104 Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Sat, 20 Jan 2024 00:23:14 +0530 Subject: [PATCH] MINOR: Fix Vertica profiler median query (#14800) --- ingestion/src/metadata/profiler/orm/functions/median.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ingestion/src/metadata/profiler/orm/functions/median.py b/ingestion/src/metadata/profiler/orm/functions/median.py index 880b005baf68..7ae0ebe1e2db 100644 --- a/ingestion/src/metadata/profiler/orm/functions/median.py +++ b/ingestion/src/metadata/profiler/orm/functions/median.py @@ -84,9 +84,10 @@ def _(elements, compiler, **kwargs): ) +@compiles(MedianFn, Dialects.Vertica) @compiles(MedianFn, Dialects.MSSQL) def _(elements, compiler, **kwargs): - """Median computation for MSSQL""" + """Median computation for MSSQL & Vertica""" col = compiler.process(elements.clauses.clauses[0]) percentile = elements.clauses.clauses[2].value return "percentile_cont(%.2f) WITHIN GROUP (ORDER BY %s ASC) OVER()" % (