Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions encodings/alp/public-api.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ impl vortex_alp::ALP

pub const vortex_alp::ALP::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_alp::ALP

pub fn vortex_alp::ALP::clone(&self) -> vortex_alp::ALP

impl core::fmt::Debug for vortex_alp::ALP

pub fn vortex_alp::ALP::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -72,7 +76,7 @@ pub fn vortex_alp::ALP::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::

pub fn vortex_alp::ALP::dtype(array: &vortex_alp::ALPArray) -> &vortex_array::dtype::DType

pub fn vortex_alp::ALP::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_alp::ALP::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_alp::ALP::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down Expand Up @@ -178,6 +182,10 @@ impl vortex_alp::ALPRD

pub const vortex_alp::ALPRD::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_alp::ALPRD

pub fn vortex_alp::ALPRD::clone(&self) -> vortex_alp::ALPRD

impl core::fmt::Debug for vortex_alp::ALPRD

pub fn vortex_alp::ALPRD::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -230,7 +238,7 @@ pub fn vortex_alp::ALPRD::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype

pub fn vortex_alp::ALPRD::dtype(array: &vortex_alp::ALPRDArray) -> &vortex_array::dtype::DType

pub fn vortex_alp::ALPRD::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_alp::ALPRD::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_alp::ALPRD::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down
13 changes: 7 additions & 6 deletions encodings/alp/src/alp/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

use std::fmt::Debug;
use std::hash::Hash;
use std::sync::Arc;

use vortex_array::ArrayEq;
use vortex_array::ArrayHash;
use vortex_array::ArrayRef;
use vortex_array::DeserializeMetadata;
use vortex_array::DynArray;
use vortex_array::ExecutionCtx;
use vortex_array::ExecutionStep;
use vortex_array::ExecutionResult;
use vortex_array::IntoArray;
use vortex_array::Precision;
use vortex_array::ProstMetadata;
Expand Down Expand Up @@ -239,10 +240,10 @@ impl VTable for ALP {
Ok(())
}

fn execute(array: &Self::Array, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionStep> {
// TODO(joe): take by value
Ok(ExecutionStep::Done(
execute_decompress(array.clone(), ctx)?.into_array(),
fn execute(array: Arc<Self::Array>, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionResult> {
let array = Arc::try_unwrap(array).unwrap_or_else(|arc| (*arc).clone());
Ok(ExecutionResult::done(
execute_decompress(array, ctx)?.into_array(),
))
}

Expand Down Expand Up @@ -273,7 +274,7 @@ pub struct ALPArray {
stats_set: ArrayStats,
}

#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ALP;

impl ALP {
Expand Down
9 changes: 5 additions & 4 deletions encodings/alp/src/alp_rd/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use std::fmt::Debug;
use std::hash::Hash;
use std::sync::Arc;

use itertools::Itertools;
use vortex_array::ArrayEq;
Expand All @@ -11,7 +12,7 @@ use vortex_array::ArrayRef;
use vortex_array::DeserializeMetadata;
use vortex_array::DynArray;
use vortex_array::ExecutionCtx;
use vortex_array::ExecutionStep;
use vortex_array::ExecutionResult;
use vortex_array::IntoArray;
use vortex_array::Precision;
use vortex_array::ProstMetadata;
Expand Down Expand Up @@ -300,7 +301,7 @@ impl VTable for ALPRD {
Ok(())
}

fn execute(array: &Self::Array, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionStep> {
fn execute(array: Arc<Self::Array>, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionResult> {
let left_parts = array.left_parts().clone().execute::<PrimitiveArray>(ctx)?;
let right_parts = array.right_parts().clone().execute::<PrimitiveArray>(ctx)?;

Expand Down Expand Up @@ -339,7 +340,7 @@ impl VTable for ALPRD {
)
};

Ok(ExecutionStep::Done(decoded_array.into_array()))
Ok(ExecutionResult::done(decoded_array.into_array()))
}

fn reduce_parent(
Expand Down Expand Up @@ -371,7 +372,7 @@ pub struct ALPRDArray {
stats_set: ArrayStats,
}

#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ALPRD;

impl ALPRD {
Expand Down
6 changes: 5 additions & 1 deletion encodings/bytebool/public-api.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ impl vortex_bytebool::ByteBool

pub const vortex_bytebool::ByteBool::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_bytebool::ByteBool

pub fn vortex_bytebool::ByteBool::clone(&self) -> vortex_bytebool::ByteBool

impl core::fmt::Debug for vortex_bytebool::ByteBool

pub fn vortex_bytebool::ByteBool::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -54,7 +58,7 @@ pub fn vortex_bytebool::ByteBool::deserialize(_bytes: &[u8], _dtype: &vortex_arr

pub fn vortex_bytebool::ByteBool::dtype(array: &vortex_bytebool::ByteBoolArray) -> &vortex_array::dtype::DType

pub fn vortex_bytebool::ByteBool::execute(array: &Self::Array, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_bytebool::ByteBool::execute(array: alloc::sync::Arc<Self::Array>, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_bytebool::ByteBool::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down
9 changes: 5 additions & 4 deletions encodings/bytebool/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

use std::fmt::Debug;
use std::hash::Hash;
use std::sync::Arc;

use vortex_array::ArrayEq;
use vortex_array::ArrayHash;
use vortex_array::ArrayRef;
use vortex_array::EmptyMetadata;
use vortex_array::ExecutionCtx;
use vortex_array::ExecutionStep;
use vortex_array::ExecutionResult;
use vortex_array::IntoArray;
use vortex_array::Precision;
use vortex_array::arrays::BoolArray;
Expand Down Expand Up @@ -187,10 +188,10 @@ impl VTable for ByteBool {
crate::rules::RULES.evaluate(array, parent, child_idx)
}

fn execute(array: &Self::Array, _ctx: &mut ExecutionCtx) -> VortexResult<ExecutionStep> {
fn execute(array: Arc<Self::Array>, _ctx: &mut ExecutionCtx) -> VortexResult<ExecutionResult> {
let boolean_buffer = BitBuffer::from(array.as_slice());
let validity = array.validity().clone();
Ok(ExecutionStep::Done(
Ok(ExecutionResult::done(
BoolArray::new(boolean_buffer, validity).into_array(),
))
}
Expand All @@ -213,7 +214,7 @@ pub struct ByteBoolArray {
stats_set: ArrayStats,
}

#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ByteBool;

impl ByteBool {
Expand Down
6 changes: 5 additions & 1 deletion encodings/datetime-parts/public-api.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ impl vortex_datetime_parts::DateTimeParts

pub const vortex_datetime_parts::DateTimeParts::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_datetime_parts::DateTimeParts

pub fn vortex_datetime_parts::DateTimeParts::clone(&self) -> vortex_datetime_parts::DateTimeParts

impl core::fmt::Debug for vortex_datetime_parts::DateTimeParts

pub fn vortex_datetime_parts::DateTimeParts::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -62,7 +66,7 @@ pub fn vortex_datetime_parts::DateTimeParts::deserialize(bytes: &[u8], _dtype: &

pub fn vortex_datetime_parts::DateTimeParts::dtype(array: &vortex_datetime_parts::DateTimePartsArray) -> &vortex_array::dtype::DType

pub fn vortex_datetime_parts::DateTimeParts::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_datetime_parts::DateTimeParts::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_datetime_parts::DateTimeParts::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down
11 changes: 6 additions & 5 deletions encodings/datetime-parts/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

use std::fmt::Debug;
use std::hash::Hash;
use std::sync::Arc;

use vortex_array::ArrayEq;
use vortex_array::ArrayHash;
use vortex_array::ArrayRef;
use vortex_array::DeserializeMetadata;
use vortex_array::DynArray;
use vortex_array::ExecutionCtx;
use vortex_array::ExecutionStep;
use vortex_array::ExecutionResult;
use vortex_array::IntoArray;
use vortex_array::Precision;
use vortex_array::ProstMetadata;
Expand Down Expand Up @@ -226,9 +227,9 @@ impl VTable for DateTimeParts {
Ok(())
}

fn execute(array: &Self::Array, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionStep> {
Ok(ExecutionStep::Done(
decode_to_temporal(array, ctx)?.into_array(),
fn execute(array: Arc<Self::Array>, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionResult> {
Ok(ExecutionResult::done(
decode_to_temporal(&array, ctx)?.into_array(),
))
}

Expand Down Expand Up @@ -267,7 +268,7 @@ pub struct DateTimePartsArrayParts {
pub subseconds: ArrayRef,
}

#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct DateTimeParts;

impl DateTimeParts {
Expand Down
6 changes: 5 additions & 1 deletion encodings/decimal-byte-parts/public-api.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ impl vortex_decimal_byte_parts::DecimalByteParts

pub const vortex_decimal_byte_parts::DecimalByteParts::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_decimal_byte_parts::DecimalByteParts

pub fn vortex_decimal_byte_parts::DecimalByteParts::clone(&self) -> vortex_decimal_byte_parts::DecimalByteParts

impl core::fmt::Debug for vortex_decimal_byte_parts::DecimalByteParts

pub fn vortex_decimal_byte_parts::DecimalByteParts::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -62,7 +66,7 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::deserialize(bytes: &[u8], _d

pub fn vortex_decimal_byte_parts::DecimalByteParts::dtype(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> &vortex_array::dtype::DType

pub fn vortex_decimal_byte_parts::DecimalByteParts::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_decimal_byte_parts::DecimalByteParts::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_decimal_byte_parts::DecimalByteParts::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down
9 changes: 5 additions & 4 deletions encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ mod rules;
mod slice;

use std::hash::Hash;
use std::sync::Arc;

use prost::Message as _;
use vortex_array::ArrayEq;
use vortex_array::ArrayHash;
use vortex_array::ArrayRef;
use vortex_array::DynArray;
use vortex_array::ExecutionCtx;
use vortex_array::ExecutionStep;
use vortex_array::ExecutionResult;
use vortex_array::IntoArray;
use vortex_array::Precision;
use vortex_array::ProstMetadata;
Expand Down Expand Up @@ -194,8 +195,8 @@ impl VTable for DecimalByteParts {
PARENT_RULES.evaluate(array, parent, child_idx)
}

fn execute(array: &Self::Array, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionStep> {
to_canonical_decimal(array, ctx).map(ExecutionStep::Done)
fn execute(array: Arc<Self::Array>, ctx: &mut ExecutionCtx) -> VortexResult<ExecutionResult> {
to_canonical_decimal(&array, ctx).map(ExecutionResult::done)
}

fn execute_parent(
Expand Down Expand Up @@ -274,7 +275,7 @@ impl DecimalBytePartsArray {
}
}

#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct DecimalByteParts;

impl DecimalByteParts {
Expand Down
24 changes: 20 additions & 4 deletions encodings/fastlanes/public-api.lock
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ impl vortex_fastlanes::BitPacked

pub const vortex_fastlanes::BitPacked::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_fastlanes::BitPacked

pub fn vortex_fastlanes::BitPacked::clone(&self) -> vortex_fastlanes::BitPacked

impl core::fmt::Debug for vortex_fastlanes::BitPacked

pub fn vortex_fastlanes::BitPacked::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -176,7 +180,7 @@ pub fn vortex_fastlanes::BitPacked::deserialize(bytes: &[u8], _dtype: &vortex_ar

pub fn vortex_fastlanes::BitPacked::dtype(array: &vortex_fastlanes::BitPackedArray) -> &vortex_array::dtype::DType

pub fn vortex_fastlanes::BitPacked::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_fastlanes::BitPacked::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_fastlanes::BitPacked::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down Expand Up @@ -286,6 +290,10 @@ impl vortex_fastlanes::Delta

pub const vortex_fastlanes::Delta::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_fastlanes::Delta

pub fn vortex_fastlanes::Delta::clone(&self) -> vortex_fastlanes::Delta

impl core::fmt::Debug for vortex_fastlanes::Delta

pub fn vortex_fastlanes::Delta::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -326,7 +334,7 @@ pub fn vortex_fastlanes::Delta::deserialize(bytes: &[u8], _dtype: &vortex_array:

pub fn vortex_fastlanes::Delta::dtype(array: &vortex_fastlanes::DeltaArray) -> &vortex_array::dtype::DType

pub fn vortex_fastlanes::Delta::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_fastlanes::Delta::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_fastlanes::Delta::id(&self) -> vortex_array::vtable::dyn_::ArrayId

Expand Down Expand Up @@ -414,6 +422,10 @@ impl vortex_fastlanes::FoR

pub const vortex_fastlanes::FoR::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_fastlanes::FoR

pub fn vortex_fastlanes::FoR::clone(&self) -> vortex_fastlanes::FoR

impl core::fmt::Debug for vortex_fastlanes::FoR

pub fn vortex_fastlanes::FoR::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -466,7 +478,7 @@ pub fn vortex_fastlanes::FoR::deserialize(bytes: &[u8], dtype: &vortex_array::dt

pub fn vortex_fastlanes::FoR::dtype(array: &vortex_fastlanes::FoRArray) -> &vortex_array::dtype::DType

pub fn vortex_fastlanes::FoR::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_fastlanes::FoR::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_fastlanes::FoR::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down Expand Up @@ -550,6 +562,10 @@ impl vortex_fastlanes::RLE

pub const vortex_fastlanes::RLE::ID: vortex_array::vtable::dyn_::ArrayId

impl core::clone::Clone for vortex_fastlanes::RLE

pub fn vortex_fastlanes::RLE::clone(&self) -> vortex_fastlanes::RLE

impl core::fmt::Debug for vortex_fastlanes::RLE

pub fn vortex_fastlanes::RLE::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand Down Expand Up @@ -590,7 +606,7 @@ pub fn vortex_fastlanes::RLE::deserialize(bytes: &[u8], _dtype: &vortex_array::d

pub fn vortex_fastlanes::RLE::dtype(array: &vortex_fastlanes::RLEArray) -> &vortex_array::dtype::DType

pub fn vortex_fastlanes::RLE::execute(array: &Self::Array, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionStep>
pub fn vortex_fastlanes::RLE::execute(array: alloc::sync::Arc<Self::Array>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_fastlanes::RLE::execute_parent(array: &Self::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::ArrayRef>>

Expand Down
Loading
Loading