File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ custom-labels = { workspace = true }
4646
4747[features ]
4848cuda = [" dep:vortex-cuda" ]
49- unstable_encodings = [" vortex/unstable_encodings" ]
49+ unstable_encodings = [" vortex/unstable_encodings" , " vortex-bench/unstable_encodings " ]
5050
5151[lints ]
5252workspace = true
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ vortex-duckdb = { workspace = true }
2727
2828[features ]
2929cuda = [" dep:vortex-cuda" ]
30- unstable_encodings = [" vortex/unstable_encodings" ]
30+ unstable_encodings = [" vortex/unstable_encodings" , " vortex-bench/unstable_encodings " ]
3131
3232[lints ]
3333workspace = true
Original file line number Diff line number Diff line change @@ -234,11 +234,17 @@ pub enum CompactionStrategy {
234234impl CompactionStrategy {
235235 pub fn apply_options ( & self , options : VortexWriteOptions ) -> VortexWriteOptions {
236236 match self {
237- CompactionStrategy :: Compact => options. with_strategy (
238- WriteStrategyBuilder :: default ( )
239- . with_btrblocks_builder ( BtrBlocksCompressorBuilder :: default ( ) . with_compact ( ) )
240- . build ( ) ,
241- ) ,
237+ CompactionStrategy :: Compact => {
238+ #[ cfg( feature = "unstable_encodings" ) ]
239+ let btrblocks = BtrBlocksCompressorBuilder :: default ( ) . with_compact_buffers ( ) ;
240+ #[ cfg( not( feature = "unstable_encodings" ) ) ]
241+ let btrblocks = BtrBlocksCompressorBuilder :: default ( ) . with_compact ( ) ;
242+ options. with_strategy (
243+ WriteStrategyBuilder :: default ( )
244+ . with_btrblocks_builder ( btrblocks)
245+ . build ( ) ,
246+ )
247+ }
242248 CompactionStrategy :: Default => options,
243249 }
244250 }
Original file line number Diff line number Diff line change @@ -161,6 +161,21 @@ impl BtrBlocksCompressorBuilder {
161161 builder
162162 }
163163
164+ /// Same as with_compact() but ZstdBuffers is used instead of Zstd
165+ #[ cfg( all( feature = "zstd" , feature = "unstable_encodings" ) ) ]
166+ pub fn with_compact_buffers ( self ) -> Self {
167+ let builder = self
168+ . with_new_scheme ( & string:: ZstdBuffersScheme )
169+ . with_new_scheme ( & binary:: ZstdBuffersScheme ) ;
170+
171+ #[ cfg( feature = "pco" ) ]
172+ let builder = builder
173+ . with_new_scheme ( & integer:: PcoScheme )
174+ . with_new_scheme ( & float:: PcoScheme ) ;
175+
176+ builder
177+ }
178+
164179 /// Excludes schemes without CUDA kernel support and adds Zstd for string and binary compression.
165180 ///
166181 /// With the `unstable_encodings` feature, buffer-level Zstd compression is used which
You can’t perform that action at this time.
0 commit comments