Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions vortex-array/src/aggregate_fn/fns/is_sorted/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,34 @@ impl AggregateFnVTable for IsSorted {
fn return_dtype(&self, _options: &Self::Options, input_dtype: &DType) -> Option<DType> {
match input_dtype {
DType::Null
| DType::Struct(..)
| DType::List(..)
| DType::FixedSizeList(..)
| DType::Variant(..) => None,
_ => Some(DType::Bool(Nullability::NonNullable)),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been written in the negative variant.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont understand?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You enumerate the ones that can instead of the ones that can’t

| 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<DType> {
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)),
}
}

Expand Down
Loading