From 4d0bfafdf5ef16b09aa4d74c51a74ee9af58540a Mon Sep 17 00:00:00 2001 From: blaginin Date: Thu, 2 Apr 2026 16:57:01 +0100 Subject: [PATCH 1/4] `Count` Signed-off-by: blaginin --- vortex-array/src/aggregate_fn/accumulator.rs | 5 + .../src/aggregate_fn/accumulator_grouped.rs | 2 +- .../src/aggregate_fn/fns/count/mod.rs | 261 ++++++++++++++++++ vortex-array/src/aggregate_fn/fns/mod.rs | 1 + vortex-array/src/aggregate_fn/vtable.rs | 16 ++ 5 files changed, 284 insertions(+), 1 deletion(-) create mode 100644 vortex-array/src/aggregate_fn/fns/count/mod.rs diff --git a/vortex-array/src/aggregate_fn/accumulator.rs b/vortex-array/src/aggregate_fn/accumulator.rs index 95d5268b969..d49820f6dd1 100644 --- a/vortex-array/src/aggregate_fn/accumulator.rs +++ b/vortex-array/src/aggregate_fn/accumulator.rs @@ -100,6 +100,11 @@ impl DynAccumulator for Accumulator { batch.dtype() ); + // Allow the vtable to short-circuit on the raw array before decompression. + if self.vtable.try_accumulate(&mut self.partial, batch, ctx)? { + return Ok(()); + } + let session = ctx.session().clone(); let kernels = &session.aggregate_fns().kernels; diff --git a/vortex-array/src/aggregate_fn/accumulator_grouped.rs b/vortex-array/src/aggregate_fn/accumulator_grouped.rs index 83b945708b2..d3406339b88 100644 --- a/vortex-array/src/aggregate_fn/accumulator_grouped.rs +++ b/vortex-array/src/aggregate_fn/accumulator_grouped.rs @@ -237,7 +237,7 @@ impl GroupedAccumulator { if validity.value(offset) { let group = elements.slice(offset..offset + size)?; accumulator.accumulate(&group, ctx)?; - states.append_scalar(&accumulator.finish()?)?; + states.append_scalar(&accumulator.flush()?)?; } else { states.append_null() } diff --git a/vortex-array/src/aggregate_fn/fns/count/mod.rs b/vortex-array/src/aggregate_fn/fns/count/mod.rs new file mode 100644 index 00000000000..c0e675577e5 --- /dev/null +++ b/vortex-array/src/aggregate_fn/fns/count/mod.rs @@ -0,0 +1,261 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright the Vortex contributors + +use vortex_error::VortexExpect; +use vortex_error::VortexResult; + +use crate::ArrayRef; +use crate::Columnar; +use crate::DynArray; +use crate::ExecutionCtx; +use crate::aggregate_fn::AggregateFnId; +use crate::aggregate_fn::AggregateFnVTable; +use crate::aggregate_fn::EmptyOptions; +use crate::dtype::DType; +use crate::dtype::Nullability; +use crate::dtype::PType; +use crate::scalar::Scalar; + +/// Count the number of non-null elements in an array. +/// +/// Applies to all types. Returns a `u64` count. +/// The identity value is zero. +#[derive(Clone, Debug)] +pub struct Count; + +impl AggregateFnVTable for Count { + type Options = EmptyOptions; + type Partial = u64; + + fn id(&self) -> AggregateFnId { + AggregateFnId::new_ref("vortex.count") + } + + fn serialize(&self, _options: &Self::Options) -> VortexResult>> { + Ok(Some(vec![])) + } + + fn deserialize( + &self, + _metadata: &[u8], + _session: &vortex_session::VortexSession, + ) -> VortexResult { + Ok(EmptyOptions) + } + + fn return_dtype(&self, _options: &Self::Options, _input_dtype: &DType) -> Option { + Some(DType::Primitive(PType::U64, Nullability::NonNullable)) + } + + fn partial_dtype(&self, options: &Self::Options, input_dtype: &DType) -> Option { + self.return_dtype(options, input_dtype) + } + + fn empty_partial( + &self, + _options: &Self::Options, + _input_dtype: &DType, + ) -> VortexResult { + Ok(0u64) + } + + fn combine_partials(&self, partial: &mut Self::Partial, other: Scalar) -> VortexResult<()> { + let val = other + .as_primitive() + .typed_value::() + .vortex_expect("count partial should not be null"); + *partial += val; + Ok(()) + } + + fn to_scalar(&self, partial: &Self::Partial) -> VortexResult { + Ok(Scalar::primitive(*partial, Nullability::NonNullable)) + } + + fn reset(&self, partial: &mut Self::Partial) { + *partial = 0; + } + + #[inline] + fn is_saturated(&self, _partial: &Self::Partial) -> bool { + false + } + + fn try_accumulate( + &self, + state: &mut Self::Partial, + batch: &ArrayRef, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { + *state += batch.valid_count()? as u64; + Ok(true) + } + + fn accumulate( + &self, + _partial: &mut Self::Partial, + _batch: &Columnar, + _ctx: &mut ExecutionCtx, + ) -> VortexResult<()> { + unreachable!("Count::try_accumulate handles all arrays") + } + + fn finalize(&self, partials: ArrayRef) -> VortexResult { + Ok(partials) + } + + fn finalize_scalar(&self, partial: &Self::Partial) -> VortexResult { + self.to_scalar(partial) + } +} + +#[cfg(test)] +mod tests { + use vortex_buffer::buffer; + use vortex_error::{VortexExpect, VortexResult}; + + use crate::LEGACY_SESSION; + use crate::VortexSessionExecute; + use crate::aggregate_fn::Accumulator; + use crate::aggregate_fn::AggregateFnVTable; + use crate::aggregate_fn::DynAccumulator; + use crate::aggregate_fn::EmptyOptions; + use crate::aggregate_fn::fns::count::Count; + use crate::arrays::ChunkedArray; + use crate::arrays::ConstantArray; + use crate::arrays::PrimitiveArray; + use crate::dtype::DType; + use crate::dtype::Nullability; + use crate::dtype::PType; + use crate::scalar::Scalar; + use crate::validity::Validity; + use crate::{ArrayRef, ExecutionCtx, IntoArray}; + + pub fn count(array: &ArrayRef, ctx: &mut ExecutionCtx) -> VortexResult { + let mut acc = Accumulator::try_new(Count, EmptyOptions, array.dtype().clone())?; + acc.accumulate(array, ctx)?; + let result = acc.finish()?; + + Ok(result + .as_primitive() + .typed_value::() + .vortex_expect("count result should not be null") as usize) + } + + #[test] + fn count_all_valid() -> VortexResult<()> { + let array = + PrimitiveArray::new(buffer![1i32, 2, 3, 4, 5], Validity::NonNullable).into_array(); + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + assert_eq!(count(&array, &mut ctx)?, 5); + Ok(()) + } + + #[test] + fn count_with_nulls() -> VortexResult<()> { + let array = PrimitiveArray::from_option_iter([Some(1i32), None, Some(3), None, Some(5)]) + .into_array(); + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + assert_eq!(count(&array, &mut ctx)?, 3); + Ok(()) + } + + #[test] + fn count_all_null() -> VortexResult<()> { + let array = PrimitiveArray::from_option_iter::([None, None, None]).into_array(); + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + assert_eq!(count(&array, &mut ctx)?, 0); + Ok(()) + } + + #[test] + fn count_empty() -> VortexResult<()> { + let dtype = DType::Primitive(PType::I32, Nullability::NonNullable); + let mut acc = Accumulator::try_new(Count, EmptyOptions, dtype)?; + let result = acc.finish()?; + assert_eq!(result.as_primitive().typed_value::(), Some(0)); + Ok(()) + } + + #[test] + fn count_multi_batch() -> VortexResult<()> { + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + let dtype = DType::Primitive(PType::I32, Nullability::Nullable); + let mut acc = Accumulator::try_new(Count, EmptyOptions, dtype)?; + + let batch1 = PrimitiveArray::from_option_iter([Some(1i32), None, Some(3)]).into_array(); + acc.accumulate(&batch1, &mut ctx)?; + + let batch2 = PrimitiveArray::from_option_iter([None, Some(5i32)]).into_array(); + acc.accumulate(&batch2, &mut ctx)?; + + let result = acc.finish()?; + assert_eq!(result.as_primitive().typed_value::(), Some(3)); + Ok(()) + } + + #[test] + fn count_finish_resets_state() -> VortexResult<()> { + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + let dtype = DType::Primitive(PType::I32, Nullability::Nullable); + let mut acc = Accumulator::try_new(Count, EmptyOptions, dtype)?; + + let batch1 = PrimitiveArray::from_option_iter([Some(1i32), None]).into_array(); + acc.accumulate(&batch1, &mut ctx)?; + let result1 = acc.finish()?; + assert_eq!(result1.as_primitive().typed_value::(), Some(1)); + + let batch2 = PrimitiveArray::from_option_iter([Some(2i32), Some(3), None]).into_array(); + acc.accumulate(&batch2, &mut ctx)?; + let result2 = acc.finish()?; + assert_eq!(result2.as_primitive().typed_value::(), Some(2)); + Ok(()) + } + + #[test] + fn count_state_merge() -> VortexResult<()> { + let dtype = DType::Primitive(PType::I32, Nullability::NonNullable); + let mut state = Count.empty_partial(&EmptyOptions, &dtype)?; + + let scalar1 = Scalar::primitive(5u64, Nullability::NonNullable); + Count.combine_partials(&mut state, scalar1)?; + + let scalar2 = Scalar::primitive(3u64, Nullability::NonNullable); + Count.combine_partials(&mut state, scalar2)?; + + let result = Count.to_scalar(&state)?; + Count.reset(&mut state); + assert_eq!(result.as_primitive().typed_value::(), Some(8)); + Ok(()) + } + + #[test] + fn count_constant_non_null() -> VortexResult<()> { + let array = ConstantArray::new(42i32, 10); + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + assert_eq!(count(&array.into_array(), &mut ctx)?, 10); + Ok(()) + } + + #[test] + fn count_constant_null() -> VortexResult<()> { + let array = ConstantArray::new( + Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)), + 10, + ); + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + assert_eq!(count(&array.into_array(), &mut ctx)?, 0); + Ok(()) + } + + #[test] + fn count_chunked() -> VortexResult<()> { + let chunk1 = PrimitiveArray::from_option_iter([Some(1i32), None, Some(3)]); + let chunk2 = PrimitiveArray::from_option_iter([None, Some(5i32), None]); + let dtype = chunk1.dtype().clone(); + let chunked = ChunkedArray::try_new(vec![chunk1.into_array(), chunk2.into_array()], dtype)?; + let mut ctx = LEGACY_SESSION.create_execution_ctx(); + assert_eq!(count(&chunked.into_array(), &mut ctx)?, 3); + Ok(()) + } +} diff --git a/vortex-array/src/aggregate_fn/fns/mod.rs b/vortex-array/src/aggregate_fn/fns/mod.rs index 4c233ba4d27..a8ae116d939 100644 --- a/vortex-array/src/aggregate_fn/fns/mod.rs +++ b/vortex-array/src/aggregate_fn/fns/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +pub mod count; pub mod is_constant; pub mod is_sorted; pub mod min_max; diff --git a/vortex-array/src/aggregate_fn/vtable.rs b/vortex-array/src/aggregate_fn/vtable.rs index feaebe61f56..e2bdf7ab602 100644 --- a/vortex-array/src/aggregate_fn/vtable.rs +++ b/vortex-array/src/aggregate_fn/vtable.rs @@ -105,6 +105,22 @@ pub trait AggregateFnVTable: 'static + Sized + Clone + Send + Sync { /// final result is fully determined. fn is_saturated(&self, state: &Self::Partial) -> bool; + /// Try to accumulate the raw array before decompression. + /// + /// Returns `true` if the array was handled, `false` to fall through to + /// the default kernel dispatch and canonicalization path. + /// + /// This is useful for aggregates that only depend on array metadata (e.g., validity) + /// rather than the encoded data, avoiding unnecessary decompression. + fn try_accumulate( + &self, + _state: &mut Self::Partial, + _batch: &ArrayRef, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { + Ok(false) + } + /// Accumulate a new canonical array into the accumulator state. fn accumulate( &self, From ba4bd864770b7e175fc9e711b2382a2787eb14da Mon Sep 17 00:00:00 2001 From: blaginin Date: Thu, 2 Apr 2026 17:01:52 +0100 Subject: [PATCH 2/4] clippy Signed-off-by: blaginin --- vortex-array/src/aggregate_fn/fns/count/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vortex-array/src/aggregate_fn/fns/count/mod.rs b/vortex-array/src/aggregate_fn/fns/count/mod.rs index c0e675577e5..b83ab317cc1 100644 --- a/vortex-array/src/aggregate_fn/fns/count/mod.rs +++ b/vortex-array/src/aggregate_fn/fns/count/mod.rs @@ -136,10 +136,12 @@ mod tests { acc.accumulate(array, ctx)?; let result = acc.finish()?; - Ok(result - .as_primitive() - .typed_value::() - .vortex_expect("count result should not be null") as usize) + Ok(usize::try_from( + result + .as_primitive() + .typed_value::() + .vortex_expect("count result should not be null"), + )?) } #[test] From c9025b27cf74c7311e9f094de42920296290d7d5 Mon Sep 17 00:00:00 2001 From: blaginin Date: Thu, 2 Apr 2026 17:03:37 +0100 Subject: [PATCH 3/4] fmt Signed-off-by: blaginin --- vortex-array/src/aggregate_fn/fns/count/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vortex-array/src/aggregate_fn/fns/count/mod.rs b/vortex-array/src/aggregate_fn/fns/count/mod.rs index b83ab317cc1..e670b1b1c56 100644 --- a/vortex-array/src/aggregate_fn/fns/count/mod.rs +++ b/vortex-array/src/aggregate_fn/fns/count/mod.rs @@ -112,8 +112,12 @@ impl AggregateFnVTable for Count { #[cfg(test)] mod tests { use vortex_buffer::buffer; - use vortex_error::{VortexExpect, VortexResult}; + use vortex_error::VortexExpect; + use vortex_error::VortexResult; + use crate::ArrayRef; + use crate::ExecutionCtx; + use crate::IntoArray; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; use crate::aggregate_fn::Accumulator; @@ -129,7 +133,6 @@ mod tests { use crate::dtype::PType; use crate::scalar::Scalar; use crate::validity::Validity; - use crate::{ArrayRef, ExecutionCtx, IntoArray}; pub fn count(array: &ArrayRef, ctx: &mut ExecutionCtx) -> VortexResult { let mut acc = Accumulator::try_new(Count, EmptyOptions, array.dtype().clone())?; From 329a3a0f6ea60ba29c005eac4665863293efe86c Mon Sep 17 00:00:00 2001 From: blaginin Date: Thu, 2 Apr 2026 17:36:32 +0100 Subject: [PATCH 4/4] api relock Signed-off-by: blaginin --- vortex-array/public-api.lock | 106 +++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index c193f10da92..1498afe75e1 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -30,6 +30,54 @@ pub mod vortex_array::aggregate_fn pub mod vortex_array::aggregate_fn::fns +pub mod vortex_array::aggregate_fn::fns::count + +pub struct vortex_array::aggregate_fn::fns::count::Count + +impl core::clone::Clone for vortex_array::aggregate_fn::fns::count::Count + +pub fn vortex_array::aggregate_fn::fns::count::Count::clone(&self) -> vortex_array::aggregate_fn::fns::count::Count + +impl core::fmt::Debug for vortex_array::aggregate_fn::fns::count::Count + +pub fn vortex_array::aggregate_fn::fns::count::Count::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result + +impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::count::Count + +pub type vortex_array::aggregate_fn::fns::count::Count::Options = vortex_array::aggregate_fn::EmptyOptions + +pub type vortex_array::aggregate_fn::fns::count::Count::Partial = u64 + +pub fn vortex_array::aggregate_fn::fns::count::Count::accumulate(&self, _partial: &mut Self::Partial, _batch: &vortex_array::Columnar, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> + +pub fn vortex_array::aggregate_fn::fns::count::Count::coerce_args(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::combine_partials(&self, partial: &mut Self::Partial, other: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<()> + +pub fn vortex_array::aggregate_fn::fns::count::Count::deserialize(&self, _metadata: &[u8], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::empty_partial(&self, _options: &Self::Options, _input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::finalize(&self, partials: vortex_array::ArrayRef) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::finalize_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::id(&self) -> vortex_array::aggregate_fn::AggregateFnId + +pub fn vortex_array::aggregate_fn::fns::count::Count::is_saturated(&self, _partial: &Self::Partial) -> bool + +pub fn vortex_array::aggregate_fn::fns::count::Count::partial_dtype(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option + +pub fn vortex_array::aggregate_fn::fns::count::Count::reset(&self, partial: &mut Self::Partial) + +pub fn vortex_array::aggregate_fn::fns::count::Count::return_dtype(&self, _options: &Self::Options, _input_dtype: &vortex_array::dtype::DType) -> core::option::Option + +pub fn vortex_array::aggregate_fn::fns::count::Count::serialize(&self, _options: &Self::Options) -> vortex_error::VortexResult>> + +pub fn vortex_array::aggregate_fn::fns::count::Count::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::try_accumulate(&self, state: &mut Self::Partial, batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + pub mod vortex_array::aggregate_fn::fns::is_constant pub mod vortex_array::aggregate_fn::fns::is_constant::primitive @@ -86,6 +134,8 @@ pub fn vortex_array::aggregate_fn::fns::is_constant::IsConstant::serialize(&self pub fn vortex_array::aggregate_fn::fns::is_constant::IsConstant::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::is_constant::IsConstant::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + pub struct vortex_array::aggregate_fn::fns::is_constant::IsConstantPartial pub fn vortex_array::aggregate_fn::fns::is_constant::is_constant(array: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -142,6 +192,8 @@ pub fn vortex_array::aggregate_fn::fns::is_sorted::IsSorted::serialize(&self, op pub fn vortex_array::aggregate_fn::fns::is_sorted::IsSorted::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::is_sorted::IsSorted::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + pub struct vortex_array::aggregate_fn::fns::is_sorted::IsSortedOptions pub vortex_array::aggregate_fn::fns::is_sorted::IsSortedOptions::strict: bool @@ -232,6 +284,8 @@ pub fn vortex_array::aggregate_fn::fns::min_max::MinMax::serialize(&self, _optio pub fn vortex_array::aggregate_fn::fns::min_max::MinMax::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::min_max::MinMax::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + pub struct vortex_array::aggregate_fn::fns::min_max::MinMaxPartial pub struct vortex_array::aggregate_fn::fns::min_max::MinMaxResult @@ -310,6 +364,8 @@ pub fn vortex_array::aggregate_fn::fns::nan_count::NanCount::serialize(&self, _o pub fn vortex_array::aggregate_fn::fns::nan_count::NanCount::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::nan_count::NanCount::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + pub fn vortex_array::aggregate_fn::fns::nan_count::nan_count(array: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult pub mod vortex_array::aggregate_fn::fns::sum @@ -372,6 +428,8 @@ pub fn vortex_array::aggregate_fn::fns::sum::Sum::serialize(&self, _options: &Se pub fn vortex_array::aggregate_fn::fns::sum::Sum::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::sum::Sum::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + pub struct vortex_array::aggregate_fn::fns::sum::SumPartial pub fn vortex_array::aggregate_fn::fns::sum::sum(array: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -616,6 +674,44 @@ pub fn vortex_array::aggregate_fn::AggregateFnVTable::serialize(&self, options: pub fn vortex_array::aggregate_fn::AggregateFnVTable::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::AggregateFnVTable::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + +impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::count::Count + +pub type vortex_array::aggregate_fn::fns::count::Count::Options = vortex_array::aggregate_fn::EmptyOptions + +pub type vortex_array::aggregate_fn::fns::count::Count::Partial = u64 + +pub fn vortex_array::aggregate_fn::fns::count::Count::accumulate(&self, _partial: &mut Self::Partial, _batch: &vortex_array::Columnar, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> + +pub fn vortex_array::aggregate_fn::fns::count::Count::coerce_args(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::combine_partials(&self, partial: &mut Self::Partial, other: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<()> + +pub fn vortex_array::aggregate_fn::fns::count::Count::deserialize(&self, _metadata: &[u8], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::empty_partial(&self, _options: &Self::Options, _input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::finalize(&self, partials: vortex_array::ArrayRef) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::finalize_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::id(&self) -> vortex_array::aggregate_fn::AggregateFnId + +pub fn vortex_array::aggregate_fn::fns::count::Count::is_saturated(&self, _partial: &Self::Partial) -> bool + +pub fn vortex_array::aggregate_fn::fns::count::Count::partial_dtype(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option + +pub fn vortex_array::aggregate_fn::fns::count::Count::reset(&self, partial: &mut Self::Partial) + +pub fn vortex_array::aggregate_fn::fns::count::Count::return_dtype(&self, _options: &Self::Options, _input_dtype: &vortex_array::dtype::DType) -> core::option::Option + +pub fn vortex_array::aggregate_fn::fns::count::Count::serialize(&self, _options: &Self::Options) -> vortex_error::VortexResult>> + +pub fn vortex_array::aggregate_fn::fns::count::Count::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult + +pub fn vortex_array::aggregate_fn::fns::count::Count::try_accumulate(&self, state: &mut Self::Partial, batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::is_constant::IsConstant pub type vortex_array::aggregate_fn::fns::is_constant::IsConstant::Options = vortex_array::aggregate_fn::EmptyOptions @@ -650,6 +746,8 @@ pub fn vortex_array::aggregate_fn::fns::is_constant::IsConstant::serialize(&self pub fn vortex_array::aggregate_fn::fns::is_constant::IsConstant::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::is_constant::IsConstant::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::is_sorted::IsSorted pub type vortex_array::aggregate_fn::fns::is_sorted::IsSorted::Options = vortex_array::aggregate_fn::fns::is_sorted::IsSortedOptions @@ -684,6 +782,8 @@ pub fn vortex_array::aggregate_fn::fns::is_sorted::IsSorted::serialize(&self, op pub fn vortex_array::aggregate_fn::fns::is_sorted::IsSorted::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::is_sorted::IsSorted::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::min_max::MinMax pub type vortex_array::aggregate_fn::fns::min_max::MinMax::Options = vortex_array::aggregate_fn::EmptyOptions @@ -718,6 +818,8 @@ pub fn vortex_array::aggregate_fn::fns::min_max::MinMax::serialize(&self, _optio pub fn vortex_array::aggregate_fn::fns::min_max::MinMax::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::min_max::MinMax::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::nan_count::NanCount pub type vortex_array::aggregate_fn::fns::nan_count::NanCount::Options = vortex_array::aggregate_fn::EmptyOptions @@ -752,6 +854,8 @@ pub fn vortex_array::aggregate_fn::fns::nan_count::NanCount::serialize(&self, _o pub fn vortex_array::aggregate_fn::fns::nan_count::NanCount::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::nan_count::NanCount::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::sum::Sum pub type vortex_array::aggregate_fn::fns::sum::Sum::Options = vortex_array::aggregate_fn::EmptyOptions @@ -786,6 +890,8 @@ pub fn vortex_array::aggregate_fn::fns::sum::Sum::serialize(&self, _options: &Se pub fn vortex_array::aggregate_fn::fns::sum::Sum::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult +pub fn vortex_array::aggregate_fn::fns::sum::Sum::try_accumulate(&self, _state: &mut Self::Partial, _batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + pub trait vortex_array::aggregate_fn::AggregateFnVTableExt: vortex_array::aggregate_fn::AggregateFnVTable pub fn vortex_array::aggregate_fn::AggregateFnVTableExt::bind(&self, options: Self::Options) -> vortex_array::aggregate_fn::AggregateFnRef