Skip to content

Commit 646e6be

Browse files
authored
ScalarFns as Arrays (#7361)
Provide a utility for serializing scalar functions as arrays --------- Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 6d07a23 commit 646e6be

5 files changed

Lines changed: 163 additions & 57 deletions

File tree

vortex-array/public-api.lock

Lines changed: 64 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3878,6 +3878,34 @@ pub type vortex_array::arrays::primitive::PrimitiveArray = vortex_array::Array<v
38783878

38793879
pub mod vortex_array::arrays::scalar_fn
38803880

3881+
pub mod vortex_array::arrays::scalar_fn::plugin
3882+
3883+
pub struct vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayParts<V: vortex_array::scalar_fn::ScalarFnVTable>
3884+
3885+
pub vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayParts::children: alloc::vec::Vec<vortex_array::ArrayRef>
3886+
3887+
pub vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayParts::options: <V as vortex_array::scalar_fn::ScalarFnVTable>::Options
3888+
3889+
pub struct vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V: vortex_array::scalar_fn::ScalarFnVTable>(_)
3890+
3891+
impl<V: vortex_array::scalar_fn::ScalarFnVTable> vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>
3892+
3893+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::new(vtable: V) -> Self
3894+
3895+
impl<V: vortex_array::scalar_fn::ScalarFnVTable + vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable> vortex_array::ArrayPlugin for vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>
3896+
3897+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::deserialize(&self, dtype: &vortex_array::dtype::DType, len: usize, metadata: &[u8], _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<vortex_array::ArrayRef>
3898+
3899+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::id(&self) -> vortex_array::ArrayId
3900+
3901+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::serialize(&self, array: &vortex_array::ArrayRef, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
3902+
3903+
pub trait vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable: vortex_array::scalar_fn::ScalarFnVTable
3904+
3905+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable::deserialize(&self, dtype: &vortex_array::dtype::DType, len: usize, metadata: &[u8], children: &dyn vortex_array::serde::ArrayChildren, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayParts<Self>>
3906+
3907+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable::serialize(&self, view: &vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, Self>, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
3908+
38813909
pub struct vortex_array::arrays::scalar_fn::AnyScalarFn
38823910

38833911
impl core::fmt::Debug for vortex_array::arrays::scalar_fn::AnyScalarFn
@@ -3922,34 +3950,6 @@ pub type vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F>::Target = vor
39223950

39233951
pub fn vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F>::deref(&self) -> &Self::Target
39243952

3925-
pub struct vortex_array::arrays::scalar_fn::ScalarFnData
3926-
3927-
impl vortex_array::arrays::scalar_fn::ScalarFnData
3928-
3929-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::build(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec<vortex_array::ArrayRef>, len: usize) -> vortex_error::VortexResult<Self>
3930-
3931-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef
3932-
3933-
impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnData
3934-
3935-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::clone(&self) -> vortex_array::arrays::scalar_fn::ScalarFnData
3936-
3937-
impl core::fmt::Debug for vortex_array::arrays::scalar_fn::ScalarFnData
3938-
3939-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
3940-
3941-
impl core::fmt::Display for vortex_array::arrays::scalar_fn::ScalarFnData
3942-
3943-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
3944-
3945-
impl vortex_array::ArrayEq for vortex_array::arrays::scalar_fn::ScalarFnData
3946-
3947-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::array_eq(&self, other: &Self, _precision: vortex_array::Precision) -> bool
3948-
3949-
impl vortex_array::ArrayHash for vortex_array::arrays::scalar_fn::ScalarFnData
3950-
3951-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::array_hash<H: core::hash::Hasher>(&self, state: &mut H, _precision: vortex_array::Precision)
3952-
39533953
pub struct vortex_array::arrays::scalar_fn::ScalarFnVTable
39543954

39553955
impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnVTable
@@ -3966,7 +3966,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: vortex_
39663966

39673967
impl vortex_array::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable
39683968

3969-
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::ScalarFnData
3969+
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::array::ScalarFnData
39703970

39713971
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable
39723972

@@ -4002,7 +4002,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_array: vortex
40024002

40034003
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slot_name(array: vortex_array::ArrayView<'_, Self>, idx: usize) -> alloc::string::String
40044004

4005-
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
4005+
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::array::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
40064006

40074007
impl vortex_array::ValidityVTable<vortex_array::arrays::scalar_fn::ScalarFnVTable> for vortex_array::arrays::scalar_fn::ScalarFnVTable
40084008

@@ -6400,7 +6400,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: vortex_
64006400

64016401
impl vortex_array::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable
64026402

6403-
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::ScalarFnData
6403+
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::array::ScalarFnData
64046404

64056405
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable
64066406

@@ -6436,7 +6436,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_array: vortex
64366436

64376437
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slot_name(array: vortex_array::ArrayView<'_, Self>, idx: usize) -> alloc::string::String
64386438

6439-
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
6439+
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::array::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
64406440

64416441
impl vortex_array::ValidityVTable<vortex_array::arrays::scalar_fn::ScalarFnVTable> for vortex_array::arrays::scalar_fn::ScalarFnVTable
64426442

@@ -19426,6 +19426,14 @@ pub fn V::is_supported_encoding(&self, id: &vortex_array::ArrayId) -> bool
1942619426

1942719427
pub fn V::serialize(&self, array: &vortex_array::ArrayRef, session: &vortex_session::VortexSession) -> core::result::Result<core::option::Option<alloc::vec::Vec<u8>>, vortex_error::VortexError>
1942819428

19429+
impl<V: vortex_array::scalar_fn::ScalarFnVTable + vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable> vortex_array::ArrayPlugin for vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>
19430+
19431+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::deserialize(&self, dtype: &vortex_array::dtype::DType, len: usize, metadata: &[u8], _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<vortex_array::ArrayRef>
19432+
19433+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::id(&self) -> vortex_array::ArrayId
19434+
19435+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::serialize(&self, array: &vortex_array::ArrayRef, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
19436+
1942919437
pub trait vortex_array::vtable::ArrayVTable: 'static + core::clone::Clone + core::marker::Sized + core::marker::Send + core::marker::Sync + core::fmt::Debug
1943019438

1943119439
pub type vortex_array::vtable::ArrayVTable::ArrayData: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + core::fmt::Display + vortex_array::ArrayHash + vortex_array::ArrayEq
@@ -20228,7 +20236,7 @@ pub fn vortex_array::arrays::patched::Patched::validate(&self, data: &vortex_arr
2022820236

2022920237
impl vortex_array::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable
2023020238

20231-
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::ScalarFnData
20239+
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::array::ScalarFnData
2023220240

2023320241
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable
2023420242

@@ -20264,7 +20272,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_array: vortex
2026420272

2026520273
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slot_name(array: vortex_array::ArrayView<'_, Self>, idx: usize) -> alloc::string::String
2026620274

20267-
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
20275+
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::array::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
2026820276

2026920277
impl vortex_array::VTable for vortex_array::arrays::slice::Slice
2027020278

@@ -21200,7 +21208,7 @@ pub fn vortex_array::arrays::patched::Patched::validate(&self, data: &vortex_arr
2120021208

2120121209
impl vortex_array::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable
2120221210

21203-
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::ScalarFnData
21211+
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::array::ScalarFnData
2120421212

2120521213
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable
2120621214

@@ -21236,7 +21244,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_array: vortex
2123621244

2123721245
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slot_name(array: vortex_array::ArrayView<'_, Self>, idx: usize) -> alloc::string::String
2123821246

21239-
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
21247+
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::array::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
2124021248

2124121249
impl vortex_array::VTable for vortex_array::arrays::slice::Slice
2124221250

@@ -22888,10 +22896,6 @@ impl vortex_array::ArrayEq for vortex_array::arrays::primitive::PrimitiveData
2288822896

2288922897
pub fn vortex_array::arrays::primitive::PrimitiveData::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool
2289022898

22891-
impl vortex_array::ArrayEq for vortex_array::arrays::scalar_fn::ScalarFnData
22892-
22893-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::array_eq(&self, other: &Self, _precision: vortex_array::Precision) -> bool
22894-
2289522899
impl vortex_array::ArrayEq for vortex_array::arrays::shared::SharedData
2289622900

2289722901
pub fn vortex_array::arrays::shared::SharedData::array_eq(&self, _other: &Self, _precision: vortex_array::Precision) -> bool
@@ -23000,10 +23004,6 @@ impl vortex_array::ArrayHash for vortex_array::arrays::primitive::PrimitiveData
2300023004

2300123005
pub fn vortex_array::arrays::primitive::PrimitiveData::array_hash<H: core::hash::Hasher>(&self, state: &mut H, precision: vortex_array::Precision)
2300223006

23003-
impl vortex_array::ArrayHash for vortex_array::arrays::scalar_fn::ScalarFnData
23004-
23005-
pub fn vortex_array::arrays::scalar_fn::ScalarFnData::array_hash<H: core::hash::Hasher>(&self, state: &mut H, _precision: vortex_array::Precision)
23006-
2300723007
impl vortex_array::ArrayHash for vortex_array::arrays::shared::SharedData
2300823008

2300923009
pub fn vortex_array::arrays::shared::SharedData::array_hash<H: core::hash::Hasher>(&self, _state: &mut H, _precision: vortex_array::Precision)
@@ -23088,6 +23088,22 @@ pub fn V::serialize(&self, array: &vortex_array::ArrayRef, session: &vortex_sess
2308823088

2308923089
pub fn V::serialize(&self, array: &vortex_array::ArrayRef, session: &vortex_session::VortexSession) -> core::result::Result<core::option::Option<alloc::vec::Vec<u8>>, vortex_error::VortexError>
2309023090

23091+
impl<V: vortex_array::scalar_fn::ScalarFnVTable + vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable> vortex_array::ArrayPlugin for vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>
23092+
23093+
impl<V: vortex_array::scalar_fn::ScalarFnVTable + vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable> vortex_array::ArrayPlugin for vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>
23094+
23095+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::deserialize(&self, dtype: &vortex_array::dtype::DType, len: usize, metadata: &[u8], _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<vortex_array::ArrayRef>
23096+
23097+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::deserialize(&self, dtype: &vortex_array::dtype::DType, len: usize, metadata: &[u8], _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<vortex_array::ArrayRef>
23098+
23099+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::id(&self) -> vortex_array::ArrayId
23100+
23101+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::id(&self) -> vortex_array::ArrayId
23102+
23103+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::serialize(&self, array: &vortex_array::ArrayRef, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
23104+
23105+
pub fn vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayPlugin<V>::serialize(&self, array: &vortex_array::ArrayRef, session: &vortex_session::VortexSession) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>
23106+
2309123107
pub trait vortex_array::ArrayVTable: 'static + core::clone::Clone + core::marker::Sized + core::marker::Send + core::marker::Sync + core::fmt::Debug
2309223108

2309323109
pub type vortex_array::ArrayVTable::ArrayData: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + core::fmt::Display + vortex_array::ArrayHash + vortex_array::ArrayEq
@@ -23890,7 +23906,7 @@ pub fn vortex_array::arrays::patched::Patched::validate(&self, data: &vortex_arr
2389023906

2389123907
impl vortex_array::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable
2389223908

23893-
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::ScalarFnData
23909+
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::array::ScalarFnData
2389423910

2389523911
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable
2389623912

@@ -23926,7 +23942,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_array: vortex
2392623942

2392723943
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slot_name(array: vortex_array::ArrayView<'_, Self>, idx: usize) -> alloc::string::String
2392823944

23929-
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
23945+
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::array::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
2393023946

2393123947
impl vortex_array::VTable for vortex_array::arrays::slice::Slice
2393223948

@@ -25110,7 +25126,7 @@ pub fn vortex_array::arrays::patched::Patched::validate(&self, data: &vortex_arr
2511025126

2511125127
impl vortex_array::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable
2511225128

25113-
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::ScalarFnData
25129+
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::scalar_fn::array::ScalarFnData
2511425130

2511525131
pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable
2511625132

@@ -25146,7 +25162,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_array: vortex
2514625162

2514725163
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::slot_name(array: vortex_array::ArrayView<'_, Self>, idx: usize) -> alloc::string::String
2514825164

25149-
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
25165+
pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validate(&self, data: &vortex_array::arrays::scalar_fn::array::ScalarFnData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::ArrayRef>]) -> vortex_error::VortexResult<()>
2515025166

2515125167
impl vortex_array::VTable for vortex_array::arrays::slice::Slice
2515225168

vortex-array/src/arrays/scalar_fn/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl Array<ScalarFnVTable> {
9292
let arg_dtypes: Vec<_> = children.iter().map(|c| c.dtype().clone()).collect();
9393
let dtype = scalar_fn.return_dtype(&arg_dtypes)?;
9494
let data = ScalarFnData::build(scalar_fn.clone(), children.clone(), len)?;
95-
let vtable = ScalarFnVTable { scalar_fn };
95+
let vtable = ScalarFnVTable { id: scalar_fn.id() };
9696
Ok(unsafe {
9797
Array::from_parts_unchecked(
9898
ArrayParts::new(vtable, dtype, len, data)

vortex-array/src/arrays/scalar_fn/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
mod array;
5+
pub mod plugin;
56
mod rules;
67
mod vtable;
78

89
pub use array::ScalarFnArrayExt;
9-
pub use array::ScalarFnData;
1010
pub use vtable::ScalarFnFactoryExt;
1111
pub use vtable::*;

0 commit comments

Comments
 (0)