From 0b216b96b54b0b92d4596072f8807902fe5932d6 Mon Sep 17 00:00:00 2001 From: ncclementi Date: Thu, 20 Jun 2024 11:29:57 -0400 Subject: [PATCH] chore: preserve nulls last when no desc or asc --- ibis/expr/operations/sortkeys.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ibis/expr/operations/sortkeys.py b/ibis/expr/operations/sortkeys.py index 0a83fa532d912..d4509a6a48fee 100644 --- a/ibis/expr/operations/sortkeys.py +++ b/ibis/expr/operations/sortkeys.py @@ -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 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)