Skip to content

Commit e519a02

Browse files
authored
Reorganize the compressor (#8745)
## Rationale for this change Tracking issue: #7697 I'd like to make some improvements to the compressor logic, and having a better structured file system makes that a bit easier. This is a purely cosmetic change (except for some paths changing, namely `vortex_compressor::ctx::*` and `vortex_compressor::estimate::*`). ## What changes are included in this PR? Moving around a lot of stuff, the tree is now: ``` └── src ├── builtins │ ├── dict │ │ ├── ... │ └── mod.rs ├── compressor │ ├── cascade.rs │ ├── constant.rs │ ├── mod.rs │ ├── sample.rs │ ├── select.rs │ ├── structural.rs │ └── tests.rs ├── lib.rs ├── scheme │ ├── ctx.rs │ ├── estimate.rs │ ├── exclusion.rs │ └── mod.rs ├── stats │ ├── ... └── trace.rs ``` Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent 5abaf98 commit e519a02

43 files changed

Lines changed: 1644 additions & 1603 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

vortex-btrblocks/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ pub use builder::BtrBlocksCompressorBuilder;
7878
pub use canonical_compressor::BtrBlocksCompressor;
7979
pub use schemes::patches::compress_patches;
8080
pub use vortex_compressor::CascadingCompressor;
81-
pub use vortex_compressor::ctx::CompressorContext;
82-
pub use vortex_compressor::ctx::MAX_CASCADE;
81+
pub use vortex_compressor::scheme::CompressorContext;
82+
pub use vortex_compressor::scheme::MAX_CASCADE;
8383
pub use vortex_compressor::scheme::Scheme;
8484
pub use vortex_compressor::scheme::SchemeExt;
8585
pub use vortex_compressor::scheme::SchemeId;

vortex-btrblocks/src/schemes/binary/zstd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use vortex_array::ArrayRef;
77
use vortex_array::Canonical;
88
use vortex_array::ExecutionCtx;
99
use vortex_array::IntoArray;
10-
use vortex_compressor::estimate::CompressionEstimate;
11-
use vortex_compressor::estimate::DeferredEstimate;
10+
use vortex_compressor::scheme::CompressionEstimate;
11+
use vortex_compressor::scheme::DeferredEstimate;
1212
use vortex_error::VortexResult;
1313

1414
use crate::ArrayAndStats;

vortex-btrblocks/src/schemes/binary/zstd_buffers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use vortex_array::ArrayRef;
77
use vortex_array::Canonical;
88
use vortex_array::ExecutionCtx;
99
use vortex_array::IntoArray;
10-
use vortex_compressor::estimate::CompressionEstimate;
11-
use vortex_compressor::estimate::DeferredEstimate;
10+
use vortex_compressor::scheme::CompressionEstimate;
11+
use vortex_compressor::scheme::DeferredEstimate;
1212
use vortex_error::VortexResult;
1313

1414
use crate::ArrayAndStats;

vortex-btrblocks/src/schemes/decimal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use vortex_array::arrays::DecimalArray;
1111
use vortex_array::arrays::PrimitiveArray;
1212
use vortex_array::arrays::decimal::narrowed_decimal;
1313
use vortex_array::dtype::DecimalType;
14-
use vortex_compressor::estimate::CompressionEstimate;
15-
use vortex_compressor::estimate::EstimateVerdict;
14+
use vortex_compressor::scheme::CompressionEstimate;
15+
use vortex_compressor::scheme::EstimateVerdict;
1616
use vortex_decimal_byte_parts::DecimalByteParts;
1717
use vortex_error::VortexResult;
1818

vortex-btrblocks/src/schemes/float/alp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use vortex_array::arrays::Patched;
1515
use vortex_array::arrays::patched::use_experimental_patches;
1616
use vortex_array::arrays::primitive::PrimitiveArrayExt;
1717
use vortex_array::dtype::PType;
18-
use vortex_compressor::estimate::CompressionEstimate;
19-
use vortex_compressor::estimate::DeferredEstimate;
20-
use vortex_compressor::estimate::EstimateVerdict;
18+
use vortex_compressor::scheme::CompressionEstimate;
19+
use vortex_compressor::scheme::DeferredEstimate;
20+
use vortex_compressor::scheme::EstimateVerdict;
2121
use vortex_error::VortexResult;
2222

2323
use crate::ArrayAndStats;

vortex-btrblocks/src/schemes/float/alprd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ use vortex_array::ExecutionCtx;
1212
use vortex_array::IntoArray;
1313
use vortex_array::arrays::primitive::PrimitiveArrayExt;
1414
use vortex_array::dtype::PType;
15-
use vortex_compressor::estimate::CompressionEstimate;
16-
use vortex_compressor::estimate::DeferredEstimate;
17-
use vortex_compressor::estimate::EstimateVerdict;
15+
use vortex_compressor::scheme::CompressionEstimate;
16+
use vortex_compressor::scheme::DeferredEstimate;
17+
use vortex_compressor::scheme::EstimateVerdict;
1818
use vortex_error::VortexResult;
1919
use vortex_error::vortex_panic;
2020

vortex-btrblocks/src/schemes/float/pco.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use vortex_array::ArrayRef;
77
use vortex_array::Canonical;
88
use vortex_array::ExecutionCtx;
99
use vortex_array::IntoArray;
10-
use vortex_compressor::estimate::CompressionEstimate;
11-
use vortex_compressor::estimate::DeferredEstimate;
10+
use vortex_compressor::scheme::CompressionEstimate;
11+
use vortex_compressor::scheme::DeferredEstimate;
1212
use vortex_error::VortexResult;
1313

1414
use crate::ArrayAndStats;

vortex-btrblocks/src/schemes/float/rle.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
use vortex_array::ArrayRef;
77
use vortex_array::Canonical;
88
use vortex_array::ExecutionCtx;
9-
use vortex_compressor::estimate::CompressionEstimate;
10-
use vortex_compressor::estimate::DeferredEstimate;
11-
use vortex_compressor::estimate::EstimateVerdict;
129
use vortex_compressor::scheme::AncestorExclusion;
10+
use vortex_compressor::scheme::CompressionEstimate;
11+
use vortex_compressor::scheme::DeferredEstimate;
1312
use vortex_compressor::scheme::DescendantExclusion;
13+
use vortex_compressor::scheme::EstimateVerdict;
1414
use vortex_error::VortexResult;
1515

1616
use crate::ArrayAndStats;

vortex-btrblocks/src/schemes/float/sparse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use vortex_array::ExecutionCtx;
99
use vortex_array::IntoArray;
1010
use vortex_array::arrays::PrimitiveArray;
1111
use vortex_array::arrays::primitive::PrimitiveArrayExt;
12-
use vortex_compressor::estimate::CompressionEstimate;
13-
use vortex_compressor::estimate::EstimateVerdict;
1412
use vortex_compressor::scheme::ChildSelection;
13+
use vortex_compressor::scheme::CompressionEstimate;
1514
use vortex_compressor::scheme::DescendantExclusion;
15+
use vortex_compressor::scheme::EstimateVerdict;
1616
use vortex_error::VortexResult;
1717
use vortex_sparse::Sparse;
1818
use vortex_sparse::SparseExt as _;

vortex-btrblocks/src/schemes/integer/bitpacking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use vortex_array::IntoArray;
1010
use vortex_array::arrays::Patched;
1111
use vortex_array::arrays::patched::use_experimental_patches;
1212
use vortex_array::arrays::primitive::PrimitiveArrayExt;
13-
use vortex_compressor::estimate::CompressionEstimate;
14-
use vortex_compressor::estimate::DeferredEstimate;
15-
use vortex_compressor::estimate::EstimateVerdict;
13+
use vortex_compressor::scheme::CompressionEstimate;
14+
use vortex_compressor::scheme::DeferredEstimate;
15+
use vortex_compressor::scheme::EstimateVerdict;
1616
use vortex_error::VortexResult;
1717
use vortex_fastlanes::BitPacked;
1818
use vortex_fastlanes::bitpack_compress::bit_width_histogram;

0 commit comments

Comments
 (0)