From 2a9e53b0023c91ab09fd4d4559cad5a24d192c49 Mon Sep 17 00:00:00 2001 From: Connor Tsui Date: Wed, 13 May 2026 11:05:53 -0400 Subject: [PATCH] fix is sorted return dtype Signed-off-by: Connor Tsui --- .../src/aggregate_fn/fns/is_sorted/mod.rs | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/vortex-array/src/aggregate_fn/fns/is_sorted/mod.rs b/vortex-array/src/aggregate_fn/fns/is_sorted/mod.rs index abc328d90df..d5726a465f1 100644 --- a/vortex-array/src/aggregate_fn/fns/is_sorted/mod.rs +++ b/vortex-array/src/aggregate_fn/fns/is_sorted/mod.rs @@ -242,22 +242,34 @@ impl AggregateFnVTable for IsSorted { fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option { match input_dtype { DType::Null - | DType::Struct(..) | DType::List(..) | DType::FixedSizeList(..) - | DType::Variant(..) => None, - _ => Some(DType::Bool(Nullability::NonNullable)), + | DType::Struct(..) + | DType::Union(_) + | DType::Variant(..) + | DType::Extension(_) => None, + DType::Bool(_) + | DType::Primitive(..) + | DType::Decimal(..) + | DType::Utf8(_) + | DType::Binary(_) => Some(DType::Bool(Nullability::NonNullable)), } } fn partial_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option { match input_dtype { DType::Null - | DType::Struct(..) | DType::List(..) | DType::FixedSizeList(..) - | DType::Variant(..) => None, - _ => Some(make_is_sorted_partial_dtype(input_dtype)), + | DType::Struct(..) + | DType::Union(_) + | DType::Variant(..) + | DType::Extension(_) => None, + DType::Bool(_) + | DType::Primitive(..) + | DType::Decimal(..) + | DType::Utf8(_) + | DType::Binary(_) => Some(make_is_sorted_partial_dtype(input_dtype)), } }