Skip to content

Commit 7a144d3

Browse files
blagininclaude
andauthored
feat: First Last (#7313)
Signed-off-by: blaginin <github@blaginin.me> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6c7eb33 commit 7a144d3

File tree

7 files changed

+790
-0
lines changed

7 files changed

+790
-0
lines changed

vortex-array/public-api.lock

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,58 @@ pub fn vortex_array::aggregate_fn::fns::count::Count::to_scalar(&self, partial:
7878

7979
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<bool>
8080

81+
pub mod vortex_array::aggregate_fn::fns::first
82+
83+
pub struct vortex_array::aggregate_fn::fns::first::First
84+
85+
impl core::clone::Clone for vortex_array::aggregate_fn::fns::first::First
86+
87+
pub fn vortex_array::aggregate_fn::fns::first::First::clone(&self) -> vortex_array::aggregate_fn::fns::first::First
88+
89+
impl core::fmt::Debug for vortex_array::aggregate_fn::fns::first::First
90+
91+
pub fn vortex_array::aggregate_fn::fns::first::First::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
92+
93+
impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::first::First
94+
95+
pub type vortex_array::aggregate_fn::fns::first::First::Options = vortex_array::aggregate_fn::EmptyOptions
96+
97+
pub type vortex_array::aggregate_fn::fns::first::First::Partial = vortex_array::aggregate_fn::fns::first::FirstPartial
98+
99+
pub fn vortex_array::aggregate_fn::fns::first::First::accumulate(&self, _partial: &mut Self::Partial, _batch: &vortex_array::Columnar, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()>
100+
101+
pub fn vortex_array::aggregate_fn::fns::first::First::coerce_args(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<vortex_array::dtype::DType>
102+
103+
pub fn vortex_array::aggregate_fn::fns::first::First::combine_partials(&self, partial: &mut Self::Partial, other: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<()>
104+
105+
pub fn vortex_array::aggregate_fn::fns::first::First::deserialize(&self, _metadata: &[u8], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<Self::Options>
106+
107+
pub fn vortex_array::aggregate_fn::fns::first::First::empty_partial(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<Self::Partial>
108+
109+
pub fn vortex_array::aggregate_fn::fns::first::First::finalize(&self, partials: vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
110+
111+
pub fn vortex_array::aggregate_fn::fns::first::First::finalize_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
112+
113+
pub fn vortex_array::aggregate_fn::fns::first::First::id(&self) -> vortex_array::aggregate_fn::AggregateFnId
114+
115+
pub fn vortex_array::aggregate_fn::fns::first::First::is_saturated(&self, partial: &Self::Partial) -> bool
116+
117+
pub fn vortex_array::aggregate_fn::fns::first::First::partial_dtype(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
118+
119+
pub fn vortex_array::aggregate_fn::fns::first::First::reset(&self, partial: &mut Self::Partial)
120+
121+
pub fn vortex_array::aggregate_fn::fns::first::First::return_dtype(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
122+
123+
pub fn vortex_array::aggregate_fn::fns::first::First::serialize(&self, _options: &Self::Options) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
124+
125+
pub fn vortex_array::aggregate_fn::fns::first::First::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
126+
127+
pub fn vortex_array::aggregate_fn::fns::first::First::try_accumulate(&self, partial: &mut Self::Partial, batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<bool>
128+
129+
pub struct vortex_array::aggregate_fn::fns::first::FirstPartial
130+
131+
pub fn vortex_array::aggregate_fn::fns::first::first(array: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
132+
81133
pub mod vortex_array::aggregate_fn::fns::is_constant
82134

83135
pub mod vortex_array::aggregate_fn::fns::is_constant::primitive
@@ -238,6 +290,58 @@ pub fn vortex_array::aggregate_fn::fns::is_sorted::is_strict_sorted(array: &vort
238290

239291
pub fn vortex_array::aggregate_fn::fns::is_sorted::make_is_sorted_partial_dtype(element_dtype: &vortex_array::dtype::DType) -> vortex_array::dtype::DType
240292

293+
pub mod vortex_array::aggregate_fn::fns::last
294+
295+
pub struct vortex_array::aggregate_fn::fns::last::Last
296+
297+
impl core::clone::Clone for vortex_array::aggregate_fn::fns::last::Last
298+
299+
pub fn vortex_array::aggregate_fn::fns::last::Last::clone(&self) -> vortex_array::aggregate_fn::fns::last::Last
300+
301+
impl core::fmt::Debug for vortex_array::aggregate_fn::fns::last::Last
302+
303+
pub fn vortex_array::aggregate_fn::fns::last::Last::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
304+
305+
impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::last::Last
306+
307+
pub type vortex_array::aggregate_fn::fns::last::Last::Options = vortex_array::aggregate_fn::EmptyOptions
308+
309+
pub type vortex_array::aggregate_fn::fns::last::Last::Partial = vortex_array::aggregate_fn::fns::last::LastPartial
310+
311+
pub fn vortex_array::aggregate_fn::fns::last::Last::accumulate(&self, _partial: &mut Self::Partial, _batch: &vortex_array::Columnar, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()>
312+
313+
pub fn vortex_array::aggregate_fn::fns::last::Last::coerce_args(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<vortex_array::dtype::DType>
314+
315+
pub fn vortex_array::aggregate_fn::fns::last::Last::combine_partials(&self, partial: &mut Self::Partial, other: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<()>
316+
317+
pub fn vortex_array::aggregate_fn::fns::last::Last::deserialize(&self, _metadata: &[u8], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<Self::Options>
318+
319+
pub fn vortex_array::aggregate_fn::fns::last::Last::empty_partial(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<Self::Partial>
320+
321+
pub fn vortex_array::aggregate_fn::fns::last::Last::finalize(&self, partials: vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
322+
323+
pub fn vortex_array::aggregate_fn::fns::last::Last::finalize_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
324+
325+
pub fn vortex_array::aggregate_fn::fns::last::Last::id(&self) -> vortex_array::aggregate_fn::AggregateFnId
326+
327+
pub fn vortex_array::aggregate_fn::fns::last::Last::is_saturated(&self, _partial: &Self::Partial) -> bool
328+
329+
pub fn vortex_array::aggregate_fn::fns::last::Last::partial_dtype(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
330+
331+
pub fn vortex_array::aggregate_fn::fns::last::Last::reset(&self, partial: &mut Self::Partial)
332+
333+
pub fn vortex_array::aggregate_fn::fns::last::Last::return_dtype(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
334+
335+
pub fn vortex_array::aggregate_fn::fns::last::Last::serialize(&self, _options: &Self::Options) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
336+
337+
pub fn vortex_array::aggregate_fn::fns::last::Last::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
338+
339+
pub fn vortex_array::aggregate_fn::fns::last::Last::try_accumulate(&self, partial: &mut Self::Partial, batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<bool>
340+
341+
pub struct vortex_array::aggregate_fn::fns::last::LastPartial
342+
343+
pub fn vortex_array::aggregate_fn::fns::last::last(array: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
344+
241345
pub mod vortex_array::aggregate_fn::fns::min_max
242346

243347
pub struct vortex_array::aggregate_fn::fns::min_max::MinMax
@@ -712,6 +816,42 @@ pub fn vortex_array::aggregate_fn::fns::count::Count::to_scalar(&self, partial:
712816

713817
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<bool>
714818

819+
impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::first::First
820+
821+
pub type vortex_array::aggregate_fn::fns::first::First::Options = vortex_array::aggregate_fn::EmptyOptions
822+
823+
pub type vortex_array::aggregate_fn::fns::first::First::Partial = vortex_array::aggregate_fn::fns::first::FirstPartial
824+
825+
pub fn vortex_array::aggregate_fn::fns::first::First::accumulate(&self, _partial: &mut Self::Partial, _batch: &vortex_array::Columnar, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()>
826+
827+
pub fn vortex_array::aggregate_fn::fns::first::First::coerce_args(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<vortex_array::dtype::DType>
828+
829+
pub fn vortex_array::aggregate_fn::fns::first::First::combine_partials(&self, partial: &mut Self::Partial, other: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<()>
830+
831+
pub fn vortex_array::aggregate_fn::fns::first::First::deserialize(&self, _metadata: &[u8], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<Self::Options>
832+
833+
pub fn vortex_array::aggregate_fn::fns::first::First::empty_partial(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<Self::Partial>
834+
835+
pub fn vortex_array::aggregate_fn::fns::first::First::finalize(&self, partials: vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
836+
837+
pub fn vortex_array::aggregate_fn::fns::first::First::finalize_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
838+
839+
pub fn vortex_array::aggregate_fn::fns::first::First::id(&self) -> vortex_array::aggregate_fn::AggregateFnId
840+
841+
pub fn vortex_array::aggregate_fn::fns::first::First::is_saturated(&self, partial: &Self::Partial) -> bool
842+
843+
pub fn vortex_array::aggregate_fn::fns::first::First::partial_dtype(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
844+
845+
pub fn vortex_array::aggregate_fn::fns::first::First::reset(&self, partial: &mut Self::Partial)
846+
847+
pub fn vortex_array::aggregate_fn::fns::first::First::return_dtype(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
848+
849+
pub fn vortex_array::aggregate_fn::fns::first::First::serialize(&self, _options: &Self::Options) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
850+
851+
pub fn vortex_array::aggregate_fn::fns::first::First::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
852+
853+
pub fn vortex_array::aggregate_fn::fns::first::First::try_accumulate(&self, partial: &mut Self::Partial, batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<bool>
854+
715855
impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::is_constant::IsConstant
716856

717857
pub type vortex_array::aggregate_fn::fns::is_constant::IsConstant::Options = vortex_array::aggregate_fn::EmptyOptions
@@ -784,6 +924,42 @@ pub fn vortex_array::aggregate_fn::fns::is_sorted::IsSorted::to_scalar(&self, pa
784924

785925
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<bool>
786926

927+
impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::last::Last
928+
929+
pub type vortex_array::aggregate_fn::fns::last::Last::Options = vortex_array::aggregate_fn::EmptyOptions
930+
931+
pub type vortex_array::aggregate_fn::fns::last::Last::Partial = vortex_array::aggregate_fn::fns::last::LastPartial
932+
933+
pub fn vortex_array::aggregate_fn::fns::last::Last::accumulate(&self, _partial: &mut Self::Partial, _batch: &vortex_array::Columnar, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()>
934+
935+
pub fn vortex_array::aggregate_fn::fns::last::Last::coerce_args(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<vortex_array::dtype::DType>
936+
937+
pub fn vortex_array::aggregate_fn::fns::last::Last::combine_partials(&self, partial: &mut Self::Partial, other: vortex_array::scalar::Scalar) -> vortex_error::VortexResult<()>
938+
939+
pub fn vortex_array::aggregate_fn::fns::last::Last::deserialize(&self, _metadata: &[u8], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<Self::Options>
940+
941+
pub fn vortex_array::aggregate_fn::fns::last::Last::empty_partial(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<Self::Partial>
942+
943+
pub fn vortex_array::aggregate_fn::fns::last::Last::finalize(&self, partials: vortex_array::ArrayRef) -> vortex_error::VortexResult<vortex_array::ArrayRef>
944+
945+
pub fn vortex_array::aggregate_fn::fns::last::Last::finalize_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
946+
947+
pub fn vortex_array::aggregate_fn::fns::last::Last::id(&self) -> vortex_array::aggregate_fn::AggregateFnId
948+
949+
pub fn vortex_array::aggregate_fn::fns::last::Last::is_saturated(&self, _partial: &Self::Partial) -> bool
950+
951+
pub fn vortex_array::aggregate_fn::fns::last::Last::partial_dtype(&self, options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
952+
953+
pub fn vortex_array::aggregate_fn::fns::last::Last::reset(&self, partial: &mut Self::Partial)
954+
955+
pub fn vortex_array::aggregate_fn::fns::last::Last::return_dtype(&self, _options: &Self::Options, input_dtype: &vortex_array::dtype::DType) -> core::option::Option<vortex_array::dtype::DType>
956+
957+
pub fn vortex_array::aggregate_fn::fns::last::Last::serialize(&self, _options: &Self::Options) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
958+
959+
pub fn vortex_array::aggregate_fn::fns::last::Last::to_scalar(&self, partial: &Self::Partial) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>
960+
961+
pub fn vortex_array::aggregate_fn::fns::last::Last::try_accumulate(&self, partial: &mut Self::Partial, batch: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<bool>
962+
787963
impl vortex_array::aggregate_fn::AggregateFnVTable for vortex_array::aggregate_fn::fns::min_max::MinMax
788964

789965
pub type vortex_array::aggregate_fn::fns::min_max::MinMax::Options = vortex_array::aggregate_fn::EmptyOptions

0 commit comments

Comments
 (0)