Skip to content

Commit 42dd858

Browse files
authored
feat(polars): add ArrayStringJoin op (#10638)
1 parent 8ed5b29 commit 42dd858

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ibis/backends/polars/compiler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,13 @@ def string_join(op, **kw):
568568
return pl.concat_str(args, separator=sep)
569569

570570

571+
@translate.register(ops.ArrayStringJoin)
572+
def array_string_join(op, **kw):
573+
arg = translate(op.arg, **kw)
574+
sep = _literal_value(op.sep)
575+
return arg.list.join(sep)
576+
577+
571578
@translate.register(ops.Substring)
572579
def string_substring(op, **kw):
573580
arg = translate(op.arg, **kw)

ibis/backends/tests/test_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ def test_capitalize(con, inp, expected):
834834
raises=(com.OperationNotDefinedError, com.UnsupportedBackendType),
835835
)
836836
@pytest.mark.notimpl(
837-
["polars", "oracle", "flink"],
837+
["oracle", "flink"],
838838
raises=com.OperationNotDefinedError,
839839
)
840840
def test_array_string_join(con):

0 commit comments

Comments
 (0)