Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: preserve nulls last when no desc or asc
Browse files Browse the repository at this point in the history
ncclementi committed Jun 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent ce6b0bf commit 0b216b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ibis/expr/operations/sortkeys.py
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ class SortKey(Value):
# TODO(kszucs): rename expr to arg or something else except expr
expr: Value
ascending: bool = True
nulls_first: bool = True
nulls_first: bool = False

dtype = rlz.dtype_like("expr")
shape = rlz.shape_like("expr")
@@ -41,7 +41,7 @@ def __coerce__(cls, value, T=None, S=None):
if isinstance(value, tuple):
key, asc, nulls_first = value

Check warning on line 42 in ibis/expr/operations/sortkeys.py

Codecov / codecov/patch

ibis/expr/operations/sortkeys.py#L42

Added line #L42 was not covered by tests
else:
key, asc, nulls_first = value, True, True
key, asc, nulls_first = value, True, False

asc = _is_ascending[asc]
key = super().__coerce__(key, T=T, S=S)

0 comments on commit 0b216b9

Please sign in to comment.