From 4f9d9f995f284bbb1fa2d3273ccf239073bc0a27 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 4 Aug 2023 06:46:36 -0400 Subject: [PATCH] feat(snowflake): add `ArrayRemove` implementation --- ibis/backends/snowflake/registry.py | 2 +- ibis/backends/tests/test_array.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ibis/backends/snowflake/registry.py b/ibis/backends/snowflake/registry.py index 123e0cbb3a79..8ca1d436ed24 100644 --- a/ibis/backends/snowflake/registry.py +++ b/ibis/backends/snowflake/registry.py @@ -399,6 +399,7 @@ def _map_get(t, op): lambda left, right: sa.func.array_distinct(sa.func.array_cat(left, right)), 2, ), + ops.ArrayRemove: fixed_arity(sa.func.array_remove, 2), ops.StringSplit: fixed_arity(sa.func.split, 2), # snowflake typeof only accepts VARIANT, so we cast ops.TypeOf: unary(lambda arg: sa.func.typeof(sa.func.to_variant(arg))), @@ -470,7 +471,6 @@ def _map_get(t, op): ops.CumulativeOp, ops.NTile, # ibis.expr.operations.array - ops.ArrayRemove, ops.ArrayRepeat, # ibis.expr.operations.reductions ops.MultiQuantile, diff --git a/ibis/backends/tests/test_array.py b/ibis/backends/tests/test_array.py index 529f5d401da5..42c6f00ae04c 100644 --- a/ibis/backends/tests/test_array.py +++ b/ibis/backends/tests/test_array.py @@ -604,7 +604,6 @@ def test_array_position(backend, con): "pandas", "polars", "postgres", - "snowflake", ], raises=com.OperationNotDefinedError, )