From e3c507e6b18a276b1bd151fb564bb7471ff8e4e3 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 19 Dec 2023 05:35:06 -0500 Subject: [PATCH] feat(clickhouse): implement `RegexSplit` --- ibis/backends/clickhouse/compiler/values.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ibis/backends/clickhouse/compiler/values.py b/ibis/backends/clickhouse/compiler/values.py index 88589b5620f3..bc10a2e82266 100644 --- a/ibis/backends/clickhouse/compiler/values.py +++ b/ibis/backends/clickhouse/compiler/values.py @@ -1050,3 +1050,8 @@ def _timestamp_range(op, *, start, stop, step, **_): func, F.range(0, F.timestampDiff(unit, start, stop), step_value) ) return result + + +@translate_val.register(ops.RegexSplit) +def _regex_split(op, *, arg, pattern, **_): + return F.splitByRegexp(pattern, cast(arg, dt.String(nullable=False)))