From 77a4b3ee23ae57af735fbdab6fae3469293dbc7b Mon Sep 17 00:00:00 2001 From: Krzysztof Date: Wed, 4 Jan 2023 03:21:09 +0100 Subject: [PATCH] feat(bigquery): implement ops.Translate --- ibis/backends/bigquery/registry.py | 2 +- ibis/backends/tests/test_string.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ibis/backends/bigquery/registry.py b/ibis/backends/bigquery/registry.py index 818521184aee..28f81458037d 100644 --- a/ibis/backends/bigquery/registry.py +++ b/ibis/backends/bigquery/registry.py @@ -587,6 +587,7 @@ def _clip(t, op): ops.Substring: _string_substring, ops.StrRight: _string_right, ops.Capitalize: _capitalize, + ops.Translate: fixed_arity("TRANSLATE", 3), ops.Repeat: fixed_arity("REPEAT", 2), ops.RegexSearch: _regex_search, ops.RegexExtract: _regex_extract, @@ -658,7 +659,6 @@ def _clip(t, op): } _invalid_operations = { - ops.Translate, ops.FindInSet, ops.DateDiff, ops.TimestampDiff, diff --git a/ibis/backends/tests/test_string.py b/ibis/backends/tests/test_string.py index 9c0282eac1f6..22aac8a21d63 100644 --- a/ibis/backends/tests/test_string.py +++ b/ibis/backends/tests/test_string.py @@ -132,7 +132,6 @@ def test_string_col_is_unicode(alltypes, df): id='translate', marks=pytest.mark.notimpl( [ - "bigquery", "clickhouse", "datafusion", "duckdb",