Skip to content

Commit

Permalink
refactor(postgres): remove dead _reduction function
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed May 23, 2022
1 parent 07571a9 commit 8c96e3c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions ibis/backends/postgres/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,22 +383,6 @@ def _regex_replace(t, expr):
return sa.func.regexp_replace(string, pattern, replacement, 'g')


def _reduction(func_name):
def reduction_compiler(t, expr):
arg, where = expr.op().args

if arg.type().equals(dt.boolean):
arg = arg.cast('int32')

func = getattr(sa.func, func_name)

if where is not None:
arg = where.ifelse(arg, None)
return func(t.translate(arg))

return reduction_compiler


def _log(t, expr):
arg, base = expr.op().args
sa_arg = t.translate(arg)
Expand Down

0 comments on commit 8c96e3c

Please sign in to comment.