Skip to content
Closed
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
6 changes: 3 additions & 3 deletions encodings/alp/src/alp/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mod tests {

let array = alp_encoded.as_array();

let metadata = array.metadata(&SESSION)?.unwrap_or_default();
let metadata = SESSION.array_serialize(array)?.unwrap();
let children = array.children();
let buffers = array
.buffers()
Expand Down Expand Up @@ -182,7 +182,7 @@ mod tests {

let array = alp_encoded.as_array();

let metadata = array.metadata(&SESSION)?.unwrap_or_default();
let metadata = SESSION.array_serialize(array)?.unwrap();
let children = array.children();
let buffers = array
.buffers()
Expand Down Expand Up @@ -213,7 +213,7 @@ mod tests {
fn primitive_array_returns_error() {
let array = PrimitiveArray::from_iter([1.0f64, 2.0, 3.0]).into_array();

let metadata = array.metadata(&SESSION).unwrap().unwrap_or_default();
let metadata = SESSION.array_serialize(&array).unwrap().unwrap();
let children = array.children();
let buffers = array
.buffers()
Expand Down
3 changes: 1 addition & 2 deletions encodings/bytebool/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ impl From<Vec<Option<bool>>> for ByteBoolData {
mod tests {
use vortex_array::ArrayContext;
use vortex_array::IntoArray;
use vortex_array::LEGACY_SESSION;
use vortex_array::assert_arrays_eq;
use vortex_array::serde::SerializeOptions;
use vortex_array::serde::SerializedArray;
Expand Down Expand Up @@ -407,7 +406,7 @@ mod tests {
let serialized = array
.clone()
.into_array()
.serialize(&ctx, &LEGACY_SESSION, &SerializeOptions::default())
.serialize(&ctx, &session, &SerializeOptions::default())
.unwrap();

let mut concat = ByteBufferMut::empty();
Expand Down
6 changes: 3 additions & 3 deletions encodings/fastlanes/src/bitpacking/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mod tests {

let array = bitpacked.as_array();

let metadata = array.metadata(&SESSION)?.unwrap_or_default();
let metadata = SESSION.array_serialize(array)?.unwrap();
let children = array.children();
let buffers = array
.buffers()
Expand Down Expand Up @@ -182,7 +182,7 @@ mod tests {

let array = bitpacked.as_array();

let metadata = array.metadata(&SESSION)?.unwrap_or_default();
let metadata = SESSION.array_serialize(array)?.unwrap();
let children = array.children();
let buffers = array
.buffers()
Expand Down Expand Up @@ -212,7 +212,7 @@ mod tests {
fn primitive_array_returns_error() -> VortexResult<()> {
let array = PrimitiveArray::from_iter([1i32, 2, 3]).into_array();

let metadata = array.metadata(&SESSION)?.unwrap_or_default();
let metadata = SESSION.array_serialize(&array)?.unwrap();
let children = array.children();
let buffers = array
.buffers()
Expand Down
9 changes: 5 additions & 4 deletions encodings/parquet-variant/src/vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,13 @@ mod tests {
use vortex_array::IntoArray;
use vortex_array::Precision;
use vortex_array::arrays::VarBinViewArray;
use vortex_array::arrays::Variant;
use vortex_array::arrays::VariantArray;
use vortex_array::dtype::DType;
use vortex_array::dtype::Nullability;
use vortex_array::dtype::PType;
use vortex_array::serde::SerializeOptions;
use vortex_array::serde::SerializedArray;
use vortex_array::session::ArraySession;
use vortex_array::session::ArraySessionExt;
use vortex_array::validity::Validity;
use vortex_buffer::BitBuffer;
Expand All @@ -261,11 +261,14 @@ mod tests {

use crate::ParquetVariant;
use crate::array::ParquetVariantArrayExt;

fn roundtrip(array: ArrayRef) -> ArrayRef {
let dtype = array.dtype().clone();
let len = array.len();

let session = VortexSession::empty().with::<vortex_array::session::ArraySession>();
let session = VortexSession::empty().with::<ArraySession>();
session.arrays().register(ParquetVariant);

let ctx = ArrayContext::empty();
let serialized = array
.serialize(&ctx, &session, &SerializeOptions::default())
Expand All @@ -276,8 +279,6 @@ mod tests {
concat.extend_from_slice(buf.as_ref());
}
let concat = concat.freeze();
session.arrays().register(ParquetVariant);
session.arrays().register(Variant);

let parts = SerializedArray::try_from(concat).unwrap();
parts
Expand Down
5 changes: 3 additions & 2 deletions encodings/pco/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ mod array;
mod compute;
mod rules;
mod slice;
#[cfg(test)]
mod test;

pub use array::*;

Expand Down Expand Up @@ -35,3 +33,6 @@ pub struct PcoMetadata {
#[prost(message, repeated, tag = "2")]
pub chunks: Vec<PcoChunkInfo>,
}

#[cfg(test)]
mod tests;
2 changes: 1 addition & 1 deletion encodings/pco/src/test.rs → encodings/pco/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ fn test_serde() -> VortexResult<()> {
let bytes = pco
.serialize(
&context,
&LEGACY_SESSION,
&SESSION,
&SerializeOptions {
offset: 0,
include_padding: true,
Expand Down
8 changes: 6 additions & 2 deletions encodings/runend/src/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ mod tests {
use vortex_array::search_sorted::SearchSorted;
use vortex_array::search_sorted::SearchSortedSide;
use vortex_array::session::ArraySession;
use vortex_array::session::ArraySessionExt;
use vortex_array::validity::Validity;
use vortex_buffer::Buffer;
use vortex_buffer::buffer;
Expand All @@ -99,8 +100,11 @@ mod tests {
use crate::RunEnd;
use crate::ops::find_slice_end_index;

static SESSION: LazyLock<VortexSession> =
LazyLock::new(|| VortexSession::empty().with::<ArraySession>());
static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
let session = VortexSession::empty().with::<ArraySession>();
session.arrays().register(RunEnd);
session
});

fn decode_run_array<R: RunEndIndexType>(
array: &RunArray<R>,
Expand Down
114 changes: 19 additions & 95 deletions encodings/zigzag/public-api.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,122 +2,46 @@ pub mod vortex_zigzag

pub struct vortex_zigzag::ZigZag

impl vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::try_new(encoded: vortex_array::array::erased::ArrayRef) -> vortex_error::VortexResult<vortex_zigzag::ZigZagArray>

impl core::clone::Clone for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::clone(&self) -> vortex_zigzag::ZigZag

impl core::fmt::Debug for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result

impl vortex_array::array::vtable::VTable for vortex_zigzag::ZigZag

pub type vortex_zigzag::ZigZag::ArrayData = vortex_zigzag::ZigZagData

pub type vortex_zigzag::ZigZag::OperationsVTable = vortex_zigzag::ZigZag

pub type vortex_zigzag::ZigZag::ValidityVTable = vortex_array::array::vtable::validity::ValidityVTableFromChild

pub fn vortex_zigzag::ZigZag::buffer(_array: vortex_array::array::view::ArrayView<'_, Self>, idx: usize) -> vortex_array::buffer::BufferHandle

pub fn vortex_zigzag::ZigZag::buffer_name(_array: vortex_array::array::view::ArrayView<'_, Self>, idx: usize) -> core::option::Option<alloc::string::String>

pub fn vortex_zigzag::ZigZag::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::array::typed::ArrayParts<Self>>

pub fn vortex_zigzag::ZigZag::execute(array: vortex_array::array::typed::Array<Self>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::executor::ExecutionResult>

pub fn vortex_zigzag::ZigZag::execute_parent(array: vortex_array::array::view::ArrayView<'_, Self>, parent: &vortex_array::array::erased::ArrayRef, child_idx: usize, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::erased::ArrayRef>>

pub fn vortex_zigzag::ZigZag::id(&self) -> vortex_array::array::ArrayId

pub fn vortex_zigzag::ZigZag::nbuffers(_array: vortex_array::array::view::ArrayView<'_, Self>) -> usize

pub fn vortex_zigzag::ZigZag::reduce_parent(array: vortex_array::array::view::ArrayView<'_, Self>, parent: &vortex_array::array::erased::ArrayRef, child_idx: usize) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::erased::ArrayRef>>

pub fn vortex_zigzag::ZigZag::serialize(_array: vortex_array::array::view::ArrayView<'_, Self>, _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>

pub fn vortex_zigzag::ZigZag::slot_name(_array: vortex_array::array::view::ArrayView<'_, Self>, idx: usize) -> alloc::string::String

pub fn vortex_zigzag::ZigZag::validate(&self, _data: &Self::ArrayData, dtype: &vortex_array::dtype::DType, len: usize, slots: &[core::option::Option<vortex_array::array::erased::ArrayRef>]) -> vortex_error::VortexResult<()>

impl vortex_array::array::vtable::operations::OperationsVTable<vortex_zigzag::ZigZag> for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::scalar_at(array: vortex_array::array::view::ArrayView<'_, vortex_zigzag::ZigZag>, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::scalar::Scalar>

impl vortex_array::array::vtable::validity::ValidityChild<vortex_zigzag::ZigZag> for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::validity_child(array: vortex_array::array::view::ArrayView<'_, vortex_zigzag::ZigZag>) -> vortex_array::array::erased::ArrayRef

impl vortex_array::arrays::dict::take::TakeExecute for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::take(array: vortex_array::array::view::ArrayView<'_, Self>, indices: &vortex_array::array::erased::ArrayRef, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::erased::ArrayRef>>

impl vortex_array::arrays::filter::kernel::FilterReduce for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::filter(array: vortex_array::array::view::ArrayView<'_, Self>, mask: &vortex_mask::Mask) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::erased::ArrayRef>>

impl vortex_array::arrays::slice::SliceReduce for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::slice(array: vortex_array::array::view::ArrayView<'_, Self>, range: core::ops::range::Range<usize>) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::erased::ArrayRef>>

impl vortex_array::scalar_fn::fns::cast::kernel::CastReduce for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::cast(array: vortex_array::array::view::ArrayView<'_, Self>, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::erased::ArrayRef>>

impl vortex_array::scalar_fn::fns::mask::kernel::MaskReduce for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZag::mask(array: vortex_array::array::view::ArrayView<'_, Self>, mask: &vortex_array::array::erased::ArrayRef) -> vortex_error::VortexResult<core::option::Option<vortex_array::array::erased::ArrayRef>>

pub struct vortex_zigzag::ZigZagData

impl vortex_zigzag::ZigZagData

pub fn vortex_zigzag::ZigZagData::new() -> Self

pub fn vortex_zigzag::ZigZagData::try_new(encoded_dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<Self>

impl core::clone::Clone for vortex_zigzag::ZigZagData

pub fn vortex_zigzag::ZigZagData::clone(&self) -> vortex_zigzag::ZigZagData
impl vortex_array::arrays::scalar_fn::plugin::ScalarFnArrayVTable for vortex_zigzag::ZigZag

impl core::default::Default for vortex_zigzag::ZigZagData
pub fn vortex_zigzag::ZigZag::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>>

pub fn vortex_zigzag::ZigZagData::default() -> Self
pub fn vortex_zigzag::ZigZag::serialize(&self, _view: &vortex_array::arrays::scalar_fn::vtable::ScalarFnArrayView<'_, Self>, _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>

impl core::fmt::Debug for vortex_zigzag::ZigZagData
impl vortex_array::scalar_fn::vtable::ScalarFnVTable for vortex_zigzag::ZigZag

pub fn vortex_zigzag::ZigZagData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub type vortex_zigzag::ZigZag::Options = vortex_array::scalar_fn::vtable::EmptyOptions

impl core::fmt::Display for vortex_zigzag::ZigZagData
pub fn vortex_zigzag::ZigZag::arity(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions) -> vortex_array::scalar_fn::vtable::Arity

pub fn vortex_zigzag::ZigZagData::fmt(&self, _f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub fn vortex_zigzag::ZigZag::child_name(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions, child_idx: usize) -> vortex_array::scalar_fn::vtable::ChildName

impl vortex_array::hash::ArrayEq for vortex_zigzag::ZigZagData
pub fn vortex_zigzag::ZigZag::deserialize(&self, _metadata: &[u8], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult<vortex_array::scalar_fn::vtable::EmptyOptions>

pub fn vortex_zigzag::ZigZagData::array_eq(&self, _other: &Self, _precision: vortex_array::hash::Precision) -> bool
pub fn vortex_zigzag::ZigZag::execute(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions, args: &dyn vortex_array::scalar_fn::vtable::ExecutionArgs, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::array::erased::ArrayRef>

impl vortex_array::hash::ArrayHash for vortex_zigzag::ZigZagData
pub fn vortex_zigzag::ZigZag::fmt_sql(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions, expr: &vortex_array::expr::expression::Expression, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result

pub fn vortex_zigzag::ZigZagData::array_hash<H: core::hash::Hasher>(&self, _state: &mut H, _precision: vortex_array::hash::Precision)
pub fn vortex_zigzag::ZigZag::id(&self) -> vortex_array::scalar_fn::ScalarFnId

pub trait vortex_zigzag::ZigZagArrayExt: vortex_array::array::typed::TypedArrayRef<vortex_zigzag::ZigZag>
pub fn vortex_zigzag::ZigZag::is_fallible(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions) -> bool

pub fn vortex_zigzag::ZigZagArrayExt::encoded(&self) -> &vortex_array::array::erased::ArrayRef
pub fn vortex_zigzag::ZigZag::is_null_sensitive(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions) -> bool

pub fn vortex_zigzag::ZigZagArrayExt::ptype(&self) -> vortex_array::dtype::ptype::PType
pub fn vortex_zigzag::ZigZag::return_dtype(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions, arg_dtypes: &[vortex_array::dtype::DType]) -> vortex_error::VortexResult<vortex_array::dtype::DType>

impl<T: vortex_array::array::typed::TypedArrayRef<vortex_zigzag::ZigZag>> vortex_zigzag::ZigZagArrayExt for T
pub fn vortex_zigzag::ZigZag::serialize(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions) -> vortex_error::VortexResult<core::option::Option<alloc::vec::Vec<u8>>>

pub fn T::encoded(&self) -> &vortex_array::array::erased::ArrayRef
pub fn vortex_zigzag::ZigZag::validity(&self, _options: &vortex_array::scalar_fn::vtable::EmptyOptions, expression: &vortex_array::expr::expression::Expression) -> vortex_error::VortexResult<core::option::Option<vortex_array::expr::expression::Expression>>

pub fn T::ptype(&self) -> vortex_array::dtype::ptype::PType
pub fn vortex_zigzag::initialize(session: &vortex_session::VortexSession)

pub fn vortex_zigzag::zigzag_decode(parray: vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_array::arrays::primitive::vtable::PrimitiveArray

pub fn vortex_zigzag::zigzag_encode(parray: vortex_array::array::view::ArrayView<'_, vortex_array::arrays::primitive::vtable::Primitive>) -> vortex_error::VortexResult<vortex_zigzag::ZigZagArray>
pub fn vortex_zigzag::zigzag_encode(parray: vortex_array::array::view::ArrayView<'_, vortex_array::arrays::primitive::vtable::Primitive>) -> vortex_error::VortexResult<vortex_array::array::erased::ArrayRef>

pub type vortex_zigzag::ZigZagArray = vortex_array::array::typed::Array<vortex_zigzag::ZigZag>
pub fn vortex_zigzag::zigzag_try_new(encoded: vortex_array::array::erased::ArrayRef) -> vortex_error::VortexResult<vortex_array::array::erased::ArrayRef>
Loading
Loading