Skip to content

Commit

Permalink
MINOR: Fix Vertica profiler median query (#14800)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulixius9 authored Jan 19, 2024
1 parent 0851b87 commit eb15502
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ingestion/src/metadata/profiler/orm/functions/median.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()" % (
Expand Down

0 comments on commit eb15502

Please sign in to comment.