Skip to content
Open
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
9 changes: 8 additions & 1 deletion encodings/alp/src/alp/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use vortex_array::patches::Patches;
use vortex_array::patches::PatchesMetadata;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::vtable;
use vortex_array::vtable::ArrayId;
Expand Down Expand Up @@ -266,7 +267,13 @@ pub struct ALPArray {
stats_set: ArrayStats,
}

#[derive(Debug)]
impl HasArrayStats for ALPArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

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

impl ALPVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/alp/src/alp_rd/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use vortex_array::patches::Patches;
use vortex_array::patches::PatchesMetadata;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::validity::Validity;
use vortex_array::vtable;
Expand Down Expand Up @@ -366,7 +367,13 @@ pub struct ALPRDArray {
stats_set: ArrayStats,
}

#[derive(Debug)]
impl HasArrayStats for ALPRDArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

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

impl ALPRDVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/bytebool/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use vortex_array::dtype::DType;
use vortex_array::scalar::Scalar;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::validity::Validity;
use vortex_array::vtable;
Expand Down Expand Up @@ -206,7 +207,13 @@ pub struct ByteBoolArray {
stats_set: ArrayStats,
}

#[derive(Debug)]
impl HasArrayStats for ByteBoolArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

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

impl ByteBoolVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/datetime-parts/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use vortex_array::dtype::Nullability;
use vortex_array::dtype::PType;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::vtable;
use vortex_array::vtable::ArrayId;
Expand Down Expand Up @@ -252,6 +253,12 @@ pub struct DateTimePartsArray {
stats_set: ArrayStats,
}

impl HasArrayStats for DateTimePartsArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

#[derive(Clone, Debug)]
pub struct DateTimePartsArrayParts {
pub dtype: DType,
Expand All @@ -260,7 +267,7 @@ pub struct DateTimePartsArrayParts {
pub subseconds: ArrayRef,
}

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

impl DateTimePartsVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use vortex_array::scalar::Scalar;
use vortex_array::scalar::ScalarValue;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::vtable;
use vortex_array::vtable::ArrayId;
Expand Down Expand Up @@ -220,6 +221,12 @@ pub struct DecimalBytePartsArray {
stats_set: ArrayStats,
}

impl HasArrayStats for DecimalBytePartsArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

pub struct DecimalBytePartsArrayParts {
pub msp: ArrayRef,
pub dtype: DType,
Expand Down Expand Up @@ -269,7 +276,7 @@ impl DecimalBytePartsArray {
}
}

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

impl DecimalBytePartsVTable {
Expand Down
7 changes: 7 additions & 0 deletions encodings/fastlanes/src/bitpacking/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use vortex_array::dtype::NativePType;
use vortex_array::dtype::PType;
use vortex_array::patches::Patches;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::validity::Validity;
use vortex_error::VortexResult;
use vortex_error::vortex_bail;
Expand Down Expand Up @@ -46,6 +47,12 @@ pub struct BitPackedArray {
pub(super) stats_set: ArrayStats,
}

impl HasArrayStats for BitPackedArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

impl BitPackedArray {
/// Create a new bitpacked array using a buffer of packed data.
///
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/bitpacking/vtable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ impl VTable for BitPackedVTable {
}
}

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

impl BitPackedVTable {
Expand Down
7 changes: 7 additions & 0 deletions encodings/fastlanes/src/delta/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use vortex_array::dtype::NativePType;
use vortex_array::dtype::PType;
use vortex_array::match_each_unsigned_integer_ptype;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::validity::Validity;
use vortex_buffer::Buffer;
use vortex_error::VortexExpect as _;
Expand Down Expand Up @@ -63,6 +64,12 @@ pub struct DeltaArray {
pub(super) stats_set: ArrayStats,
}

impl HasArrayStats for DeltaArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

impl DeltaArray {
// TODO(ngates): remove constructing from vec
pub fn try_from_vec<T: NativePType>(vec: Vec<T>) -> VortexResult<Self> {
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/delta/vtable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl VTable for DeltaVTable {
}
}

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

impl DeltaVTable {
Expand Down
7 changes: 7 additions & 0 deletions encodings/fastlanes/src/for/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use vortex_array::ArrayRef;
use vortex_array::dtype::PType;
use vortex_array::scalar::Scalar;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_error::VortexResult;
use vortex_error::vortex_bail;

Expand All @@ -22,6 +23,12 @@ pub struct FoRArray {
pub(super) stats_set: ArrayStats,
}

impl HasArrayStats for FoRArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

impl FoRArray {
pub fn try_new(encoded: ArrayRef, reference: Scalar) -> VortexResult<Self> {
if reference.is_null() {
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/for/vtable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl VTable for FoRVTable {
}
}

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

impl FoRVTable {
Expand Down
7 changes: 7 additions & 0 deletions encodings/fastlanes/src/rle/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use vortex_array::DynArray;
use vortex_array::dtype::DType;
use vortex_array::dtype::PType;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_error::VortexResult;
use vortex_error::vortex_ensure;

Expand Down Expand Up @@ -38,6 +39,12 @@ pub struct RLEArray {
pub(super) length: usize,
}

impl HasArrayStats for RLEArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

impl RLEArray {
fn validate(
values: &ArrayRef,
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/rle/vtable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl VTable for RLEVTable {
}
}

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

impl RLEVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/fsst/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use vortex_array::dtype::Nullability;
use vortex_array::dtype::PType;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::validity::Validity;
use vortex_array::vtable;
Expand Down Expand Up @@ -370,6 +371,12 @@ pub struct FSSTArray {
compressor: Arc<LazyLock<Compressor, Box<dyn Fn() -> Compressor + Send>>>,
}

impl HasArrayStats for FSSTArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

impl Debug for FSSTArray {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.debug_struct("FSSTArray")
Expand All @@ -382,7 +389,7 @@ impl Debug for FSSTArray {
}
}

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

impl FSSTVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/pco/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use vortex_array::dtype::half;
use vortex_array::scalar::Scalar;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::validity::Validity;
use vortex_array::vtable;
Expand Down Expand Up @@ -305,7 +306,7 @@ pub(crate) fn vortex_err_from_pco(err: PcoError) -> VortexError {
}
}

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

impl PcoVTable {
Expand All @@ -325,6 +326,12 @@ pub struct PcoArray {
slice_stop: usize,
}

impl HasArrayStats for PcoArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

impl PcoArray {
pub fn new(
chunk_metas: Vec<ByteBuffer>,
Expand Down
9 changes: 8 additions & 1 deletion encodings/runend/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use vortex_array::search_sorted::SearchSorted;
use vortex_array::search_sorted::SearchSortedSide;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::validity::Validity;
use vortex_array::vtable;
Expand Down Expand Up @@ -214,12 +215,18 @@ pub struct RunEndArray {
stats_set: ArrayStats,
}

impl HasArrayStats for RunEndArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

pub struct RunEndArrayParts {
pub ends: ArrayRef,
pub values: ArrayRef,
}

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

impl RunEndVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/sequence/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use vortex_array::scalar::Scalar;
use vortex_array::scalar::ScalarValue;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSet;
use vortex_array::stats::StatsSetRef;
use vortex_array::validity::Validity;
Expand Down Expand Up @@ -83,6 +84,12 @@ pub struct SequenceArray {
stats_set: ArrayStats,
}

impl HasArrayStats for SequenceArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

impl SequenceArray {
pub fn try_new_typed<T: NativePType + Into<PValue>>(
base: T,
Expand Down Expand Up @@ -427,7 +434,7 @@ impl ValidityVTable<SequenceVTable> for SequenceVTable {
}
}

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

impl SequenceVTable {
Expand Down
9 changes: 8 additions & 1 deletion encodings/sparse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use vortex_array::scalar::ScalarValue;
use vortex_array::scalar_fn::fns::operators::Operator;
use vortex_array::serde::ArrayChildren;
use vortex_array::stats::ArrayStats;
use vortex_array::stats::HasArrayStats;
use vortex_array::stats::StatsSetRef;
use vortex_array::validity::Validity;
use vortex_array::vtable;
Expand Down Expand Up @@ -267,7 +268,13 @@ pub struct SparseArray {
stats_set: ArrayStats,
}

#[derive(Debug)]
impl HasArrayStats for SparseArray {
fn array_stats(&self) -> &ArrayStats {
&self.stats_set
}
}

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

impl SparseVTable {
Expand Down
Loading
Loading