Skip to content

Commit

Permalink
chore(bigquery): fix groupconcat impl
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 2, 2024
1 parent c482aa2 commit a30996c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ibis/backends/sql/compilers/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ def visit_TimestampDelta(self, op, *, left, right, part):
"timestamp difference with mixed timezone/timezoneless values is not implemented"
)

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

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

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

def visit_FloorDivide(self, op, *, left, right):
return self.cast(self.f.floor(self.f.ieee_divide(left, right)), op.dtype)

Expand Down

0 comments on commit a30996c

Please sign in to comment.