Skip to content

Commit

Permalink
chore(mysql): fix groupconcat impl
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 2, 2024
1 parent 57ef4cc commit c482aa2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ibis/backends/sql/compilers/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,13 @@ def visit_GroupConcat(self, op, *, arg, sep, where, order_by):
"Only string literal separators are supported"
)

return super().visit_GroupConcat(
op, arg=arg, sep=sep, where=where, order_by=order_by
)
if where is not None:
arg = self.if_(where, arg, NULL)

if order_by:
arg = sge.Order(this=arg, expressions=order_by)

return sge.GroupConcat(this=arg, separator=sep)

def visit_DayOfWeekIndex(self, op, *, arg):
return (self.f.dayofweek(arg) + 5) % 7
Expand Down

0 comments on commit c482aa2

Please sign in to comment.