Skip to content

Commit

Permalink
feat(snowflake): use upstream array_sort
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 19, 2023
1 parent 186b61e commit 9624341
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions ibis/backends/snowflake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/snowflake/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9624341

Please sign in to comment.