From 96243416771109fbaf383167470ac2481fe938ef Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sun, 19 Nov 2023 08:32:31 -0500 Subject: [PATCH] feat(snowflake): use upstream `array_sort` --- ibis/backends/snowflake/__init__.py | 5 ----- ibis/backends/snowflake/registry.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/ibis/backends/snowflake/__init__.py b/ibis/backends/snowflake/__init__.py index fe8ea92505c5..236e3ac6bc6d 100644 --- a/ibis/backends/snowflake/__init__.py +++ b/ibis/backends/snowflake/__init__.py @@ -110,11 +110,6 @@ class SnowflakeCompiler(AlchemyCompiler): return Object.assign(...keys.map((key, j) => ({[key]: arrays[j][i]}))); })""", }, - "ibis_udfs.public.array_sort": { - "inputs": {"array": ARRAY}, - "returns": ARRAY, - "source": """return array.sort();""", - }, "ibis_udfs.public.array_repeat": { # Integer inputs are not allowed because JavaScript only supports # doubles diff --git a/ibis/backends/snowflake/registry.py b/ibis/backends/snowflake/registry.py index 546f629dcb6e..2373dd7d9534 100644 --- a/ibis/backends/snowflake/registry.py +++ b/ibis/backends/snowflake/registry.py @@ -420,7 +420,7 @@ def _timestamp_bucket(t, op): ops.ArrayRemove: fixed_arity(sa.func.array_remove, 2), ops.ArrayIntersect: fixed_arity(sa.func.array_intersection, 2), ops.ArrayZip: _array_zip, - ops.ArraySort: unary(sa.func.ibis_udfs.public.array_sort), + ops.ArraySort: unary(sa.func.array_sort), ops.ArrayRepeat: fixed_arity(sa.func.ibis_udfs.public.array_repeat, 2), ops.StringSplit: fixed_arity(sa.func.split, 2), # snowflake typeof only accepts VARIANT, so we cast