From ced5a61b0700c963522c15a24ebb018e33d44aba Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Mon, 6 Mar 2023 03:56:45 -0500 Subject: [PATCH] fix(polars): back compat for `concat_str` separator argument --- ibis/backends/polars/compiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ibis/backends/polars/compiler.py b/ibis/backends/polars/compiler.py index 5f183c835f11..ac0fd4eab41b 100644 --- a/ibis/backends/polars/compiler.py +++ b/ibis/backends/polars/compiler.py @@ -478,7 +478,11 @@ def string_concat(op): def string_join(op): args = [translate(arg) for arg in op.arg] _assert_literal(op.sep) - return pl.concat_str(args, sep=op.sep.value) + sep = op.sep.value + try: + return pl.concat_str(args, separator=sep) + except TypeError: # pragma: no cover + return pl.concat_str(args, sep=sep) # pragma: no cover @translate.register(ops.Substring)