Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn committed Apr 23, 2024
2 parents 2c67f6b + 1ee166a commit 3a1898f
Show file tree
Hide file tree
Showing 16 changed files with 235 additions and 342 deletions.
66 changes: 66 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
"fastlanez-sys",
"pyvortex",
"vortex-alloc",
#"vortex-alp",
"vortex-alp",
"vortex-array",
"vortex-datetime-parts",
"vortex-dict",
Expand Down
1 change: 1 addition & 0 deletions bench-vortex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ reqwest = { workspace = true }
simplelog = { workspace = true }
tokio = { workspace = true }
uuid = { workspace = true }
vortex-alp = { path = "../vortex-alp" }
vortex-array = { path = "../vortex-array" }
vortex-datetime-parts = { path = "../vortex-datetime-parts" }
vortex-dict = { path = "../vortex-dict" }
Expand Down
3 changes: 2 additions & 1 deletion bench-vortex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use vortex::arrow::FromArrowType;
use vortex::compress::{CompressConfig, CompressCtx};
use vortex::encoding::{EncodingRef, VORTEX_ENCODINGS};
use vortex::{IntoArray, OwnedArray, ToArrayData};
use vortex_alp::ALPEncoding;
use vortex_datetime_parts::DateTimePartsEncoding;
use vortex_dict::DictEncoding;
use vortex_fastlanes::{BitPackedEncoding, FoREncoding};
Expand Down Expand Up @@ -106,7 +107,7 @@ pub fn enumerate_arrays() -> Vec<EncodingRef> {
VORTEX_ENCODINGS.iter().map(|e| e.id()).collect_vec()
);
vec![
//&ALPEncoding,
&ALPEncoding,
&DictEncoding,
&BitPackedEncoding,
&FoREncoding,
Expand Down
2 changes: 1 addition & 1 deletion pyvortex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ crate-type = ["rlib", "cdylib"]
[dependencies]
arrow = { workspace = true }
vortex-array = { path = "../vortex-array" }
#vortex-alp = { path = "../vortex-alp" }
vortex-alp = { path = "../vortex-alp" }
vortex-dict = { path = "../vortex-dict" }
vortex-error = { path = "../vortex-error" }
vortex-fastlanes = { path = "../vortex-fastlanes" }
Expand Down
8 changes: 7 additions & 1 deletion pyvortex/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use vortex::encoding::EncodingRef;
use vortex::ToStatic;
use vortex::{ArrayDType, ArrayData, IntoArray, OwnedArray};
use vortex::{ArrayDef, IntoArrayData};
use vortex_alp::{ALPArray, ALPEncoding, OwnedALPArray, ALP};
use vortex_dict::{Dict, DictArray, DictEncoding, OwnedDictArray};
use vortex_fastlanes::{
BitPacked, BitPackedArray, BitPackedEncoding, Delta, DeltaArray, DeltaEncoding, FoR, FoRArray,
Expand Down Expand Up @@ -67,7 +68,7 @@ pyarray!(StructEncoding, StructArray, "StructArray");
pyarray!(VarBinEncoding, VarBinArray, "VarBinArray");
pyarray!(VarBinViewEncoding, VarBinViewArray, "VarBinViewArray");

// pyarray!(ALPEncoding, ALPArray, "ALPArray");
pyarray!(ALPEncoding, ALPArray, "ALPArray");
pyarray!(BitPackedEncoding, BitPackedArray, "BitPackedArray");
pyarray!(FoREncoding, FoRArray, "FoRArray");
pyarray!(DeltaEncoding, DeltaArray, "DeltaArray");
Expand Down Expand Up @@ -156,6 +157,11 @@ impl PyArray {
)?
.extract(py),

ALP::ID => PyALPArray::wrap(
py,
OwnedALPArray::try_from(inner.into_array()).map_err(PyVortexError::map_err)?,
)?
.extract(py),
_ => Py::new(
py,
Self {
Expand Down
1 change: 1 addition & 0 deletions pyvortex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ fn _lib(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_class::<PyVarBinArray>()?;
m.add_class::<PyVarBinViewArray>()?;
// m.add_class::<PyZigZagArray>()?;
m.add_class::<PyALPArray>()?;

m.add_class::<PyDType>()?;

Expand Down
10 changes: 6 additions & 4 deletions vortex-alp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ rust-version = { workspace = true }
workspace = true

[dependencies]
itertools = { workspace = true }
linkme = { workspace = true }
log = { workspace = true }
num-traits = { workspace = true }
paste = { workspace = true }
serde = { workspace = true, features = ["derive"] }
vortex-array = { path = "../vortex-array" }
vortex-error = { path = "../vortex-error" }
vortex-schema = { path = "../vortex-schema" }
linkme = { workspace = true }
itertools = { workspace = true }
num-traits = { workspace = true }
log = { workspace = true }

[dev-dependencies]
divan = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion vortex-alp/src/alp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ use std::mem::size_of;

use itertools::Itertools;
use num_traits::{Float, NumCast, PrimInt, Zero};
use serde::{Deserialize, Serialize};

const SAMPLE_SIZE: usize = 32;

#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Exponents {
pub e: u8,
pub f: u8,
Expand Down
Loading

0 comments on commit 3a1898f

Please sign in to comment.