Skip to content

Commit

Permalink
feat(polars): array sort
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and jcrist committed Aug 9, 2024
1 parent ca85ae2 commit 9a2563b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,12 @@ def timestamp_diff(op, **kw):
return left.dt.truncate("1s") - right.dt.truncate("1s")


@translate.register(ops.ArraySort)
def array_sort(op, **kw):
arg = translate(op.arg, **kw)
return arg.list.sort()


@translate.register(ops.ArrayLength)
def array_length(op, **kw):
arg = translate(op.arg, **kw)
Expand Down
1 change: 0 additions & 1 deletion ibis/backends/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ def test_array_unique(con, input, expected):


@builtin_array
@pytest.mark.notimpl(["polars"], raises=com.OperationNotDefinedError)
@pytest.mark.notyet(
["risingwave"],
raises=AssertionError,
Expand Down

0 comments on commit 9a2563b

Please sign in to comment.