Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn committed Mar 4, 2024
1 parent e8e4d14 commit 980837c
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
6 changes: 4 additions & 2 deletions vortex-fastlanes/src/bitpacking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ impl StatsCompute for BitPackedArray {
#[derive(Debug)]
pub struct BitPackedEncoding;

pub const FL_BITPACKED_ENCODING: EncodingId = EncodingId::new("fastlanes.bitpacked");
impl BitPackedEncoding {
pub const ID: EncodingId = EncodingId::new("fastlanes.bitpacked");
}

impl Encoding for BitPackedEncoding {
fn id(&self) -> &EncodingId {
&FL_BITPACKED_ENCODING
&Self::ID
}

fn compression(&self) -> Option<&dyn EncodingCompression> {
Expand Down
6 changes: 4 additions & 2 deletions vortex-fastlanes/src/for/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,13 @@ impl StatsCompute for FoRArray {
#[derive(Debug)]
pub struct FoREncoding;

pub const FL_FOR_ENCODING: EncodingId = EncodingId::new("fastlanes.for");
impl FoREncoding {
pub const ID: EncodingId = EncodingId::new("fastlanes.for");
}

impl Encoding for FoREncoding {
fn id(&self) -> &EncodingId {
&FL_FOR_ENCODING
&Self::ID
}

fn compression(&self) -> Option<&dyn EncodingCompression> {
Expand Down
6 changes: 4 additions & 2 deletions vortex-ffor/src/ffor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ impl ArrayDisplay for FFORArray {
#[derive(Debug)]
pub struct FFoREncoding;

pub const FFOR_ENCODING: EncodingId = EncodingId::new("vortex.ffor");
impl FFoREncoding {
pub const ID: EncodingId = EncodingId::new("vortex.ffor");
}

impl Encoding for FFoREncoding {
fn id(&self) -> &EncodingId {
&FFOR_ENCODING
&Self::ID
}

fn compression(&self) -> Option<&dyn EncodingCompression> {
Expand Down
6 changes: 4 additions & 2 deletions vortex-ree/src/ree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,13 @@ impl<'arr> AsRef<(dyn Array + 'arr)> for REEArray {
#[derive(Debug)]
pub struct REEEncoding;

pub const REE_ENCODING: EncodingId = EncodingId::new("vortex.ree");
impl REEEncoding {
pub const ID: EncodingId = EncodingId::new("vortex.ree");
}

impl Encoding for REEEncoding {
fn id(&self) -> &EncodingId {
&REE_ENCODING
&Self::ID
}

fn compression(&self) -> Option<&dyn EncodingCompression> {
Expand Down
6 changes: 4 additions & 2 deletions vortex-roaring/src/boolean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@ impl ArrayDisplay for RoaringBoolArray {
#[derive(Debug)]
pub struct RoaringBoolEncoding;

pub const ROARING_BOOL_ENCODING: EncodingId = EncodingId::new("roaring.bool");
impl RoaringBoolEncoding {
pub const ID: EncodingId = EncodingId::new("roaring.bool");
}

impl Encoding for RoaringBoolEncoding {
fn id(&self) -> &EncodingId {
&ROARING_BOOL_ENCODING
&Self::ID
}

fn compression(&self) -> Option<&dyn EncodingCompression> {
Expand Down
6 changes: 4 additions & 2 deletions vortex-roaring/src/integer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,13 @@ impl ArrayDisplay for RoaringIntArray {
#[derive(Debug)]
pub struct RoaringIntEncoding;

pub const ROARING_INT_ENCODING: EncodingId = EncodingId::new("roaring.int");
impl RoaringIntEncoding {
pub const ID: EncodingId = EncodingId::new("roaring.int");
}

impl Encoding for RoaringIntEncoding {
fn id(&self) -> &EncodingId {
&ROARING_INT_ENCODING
&Self::ID
}

fn compression(&self) -> Option<&dyn EncodingCompression> {
Expand Down
6 changes: 4 additions & 2 deletions vortex-zigzag/src/zigzag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@ impl ArrayDisplay for ZigZagArray {
#[derive(Debug)]
pub struct ZigZagEncoding;

pub const ZIGZAG_ENCODING: EncodingId = EncodingId::new("vortex.zigzag");
impl ZigZagEncoding {
pub const ID: EncodingId = EncodingId::new("vortex.zigzag");
}

impl Encoding for ZigZagEncoding {
fn id(&self) -> &EncodingId {
&ZIGZAG_ENCODING
&Self::ID
}

fn compression(&self) -> Option<&dyn EncodingCompression> {
Expand Down
4 changes: 2 additions & 2 deletions vortex/src/array/bool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ use crate::serde::{ArraySerde, EncodingSerde};
use crate::stats::{Stat, Stats, StatsSet};

use super::{
check_index_bounds, check_slice_bounds, check_validity_buffer, encoding_impl, Array, ArrayRef,
ArrowIterator, Encoding, EncodingId, EncodingRef, ENCODINGS,
check_index_bounds, check_slice_bounds, check_validity_buffer, Array, ArrayRef, ArrowIterator,
Encoding, EncodingId, EncodingRef, ENCODINGS,
};

mod compress;
Expand Down

0 comments on commit 980837c

Please sign in to comment.