Skip to content

Commit 26a0271

Browse files
committed
add vortex-compressor
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent 60aba91 commit 26a0271

27 files changed

Lines changed: 4193 additions & 33 deletions

File tree

Cargo.lock

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ members = [
1212
"vortex-proto",
1313
"vortex-array",
1414
"vortex-tensor",
15+
"vortex-compressor",
1516
"vortex-btrblocks",
1617
"vortex-layout",
1718
"vortex-scan",
@@ -264,6 +265,7 @@ vortex-array = { version = "0.1.0", path = "./vortex-array", default-features =
264265
vortex-btrblocks = { version = "0.1.0", path = "./vortex-btrblocks", default-features = false }
265266
vortex-buffer = { version = "0.1.0", path = "./vortex-buffer", default-features = false }
266267
vortex-bytebool = { version = "0.1.0", path = "./encodings/bytebool", default-features = false }
268+
vortex-compressor = { version = "0.1.0", path = "./vortex-compressor", default-features = false }
267269
vortex-datafusion = { version = "0.1.0", path = "./vortex-datafusion", default-features = false }
268270
vortex-datetime-parts = { version = "0.1.0", path = "./encodings/datetime-parts", default-features = false }
269271
vortex-decimal-byte-parts = { version = "0.1.0", path = "encodings/decimal-byte-parts", default-features = false }

fuzz/src/array/mod.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ use vortex_array::search_sorted::SearchSorted;
6161
use vortex_array::search_sorted::SearchSortedSide;
6262
use vortex_btrblocks::BtrBlocksCompressor;
6363
use vortex_btrblocks::BtrBlocksCompressorBuilder;
64-
use vortex_btrblocks::FloatCode;
65-
use vortex_btrblocks::IntCode;
66-
use vortex_btrblocks::StringCode;
64+
use vortex_btrblocks::SchemeExt;
65+
use vortex_btrblocks::schemes::float;
66+
use vortex_btrblocks::schemes::integer;
67+
use vortex_btrblocks::schemes::string;
6768
use vortex_error::VortexExpect;
6869
use vortex_error::vortex_panic;
6970
use vortex_mask::Mask;
@@ -546,9 +547,11 @@ pub fn compress_array(array: &ArrayRef, strategy: CompressorStrategy) -> ArrayRe
546547
.compress(array)
547548
.vortex_expect("BtrBlocksCompressor compress should succeed in fuzz test"),
548549
CompressorStrategy::Compact => BtrBlocksCompressorBuilder::default()
549-
.include_string([StringCode::Zstd])
550-
.include_int([IntCode::Pco])
551-
.include_float([FloatCode::Pco])
550+
.include([
551+
string::ZstdScheme.id(),
552+
integer::PcoScheme.id(),
553+
float::PcoScheme.id(),
554+
])
552555
.build()
553556
.compress(array)
554557
.vortex_expect("Compact compress should succeed in fuzz test"),

vortex-array/public-api.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23780,6 +23780,14 @@ pub fn vortex_array::ExecutionCtx::new(session: vortex_session::VortexSession) -
2378023780

2378123781
pub fn vortex_array::ExecutionCtx::session(&self) -> &vortex_session::VortexSession
2378223782

23783+
impl core::clone::Clone for vortex_array::ExecutionCtx
23784+
23785+
pub fn vortex_array::ExecutionCtx::clone(&self) -> vortex_array::ExecutionCtx
23786+
23787+
impl core::fmt::Debug for vortex_array::ExecutionCtx
23788+
23789+
pub fn vortex_array::ExecutionCtx::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
23790+
2378323791
impl core::fmt::Display for vortex_array::ExecutionCtx
2378423792

2378523793
pub fn vortex_array::ExecutionCtx::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result

vortex-array/src/executor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ impl dyn DynArray + '_ {
190190
///
191191
/// Accumulates a trace of execution steps. Individual steps are logged at TRACE level for
192192
/// real-time following, and the full trace is dumped at DEBUG level when the context is dropped.
193+
#[derive(Debug, Clone)]
193194
pub struct ExecutionCtx {
194195
id: usize,
195196
session: VortexSession,

vortex-compressor/Cargo.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[package]
2+
name = "vortex-compressor"
3+
authors = { workspace = true }
4+
categories = { workspace = true }
5+
description = "Encoding-agnostic compression framework for Vortex arrays"
6+
edition = { workspace = true }
7+
homepage = { workspace = true }
8+
include = { workspace = true }
9+
keywords = { workspace = true }
10+
license = { workspace = true }
11+
readme = { workspace = true }
12+
repository = { workspace = true }
13+
rust-version = { workspace = true }
14+
version = { workspace = true }
15+
16+
[dependencies]
17+
itertools = { workspace = true }
18+
num-traits = { workspace = true }
19+
parking_lot = { workspace = true }
20+
rand = { workspace = true }
21+
rustc-hash = { workspace = true }
22+
tracing = { workspace = true }
23+
vortex-array = { workspace = true }
24+
vortex-buffer = { workspace = true }
25+
vortex-error = { workspace = true }
26+
vortex-mask = { workspace = true }
27+
vortex-utils = { workspace = true }
28+
29+
[dev-dependencies]
30+
rstest = { workspace = true }
31+
vortex-array = { workspace = true, features = ["_test-harness"] }
32+
33+
[lints]
34+
workspace = true

0 commit comments

Comments
 (0)