Skip to content

Commit

Permalink
refactor(compilers): conslidate StringJoin impl
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed Feb 12, 2024
1 parent 3aa109a commit 28fb6ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions ibis/backends/clickhouse/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,6 @@ def visit_StringSplit(self, op, *, arg, delimiter):
delimiter, self.cast(arg, dt.String(nullable=False))
)

@visit_node.register(ops.StringJoin)
def visit_StringJoin(self, op, *, sep, arg):
return self.f.arrayStringConcat(self.f.array(*arg), sep)

@visit_node.register(ops.Capitalize)
def visit_Capitalize(self, op, *, arg):
return self.f.concat(
Expand Down
4 changes: 0 additions & 4 deletions ibis/backends/duckdb/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@ def visit_CountDistinctStar(self, op, *, where, arg):
)
return self.agg.count(sge.Distinct(expressions=[row]), where=where)

@visit_node.register(ops.StringJoin)
def visit_StringJoin(self, op, *, arg, sep):
return self.f.list_aggr(self.f.array(*arg), "string_agg", sep)

@visit_node.register(ops.ExtractMillisecond)
def visit_ExtractMillisecond(self, op, *, arg):
return self.f.mod(self.f.extract("ms", arg), 1_000)
Expand Down

0 comments on commit 28fb6ec

Please sign in to comment.