Skip to content

Commit eeaea6d

Browse files
committed
compress dict array values
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent 8efe1dc commit eeaea6d

File tree

1 file changed

+7
-2
lines changed
  • vortex-btrblocks/src/compressor/integer

1 file changed

+7
-2
lines changed

vortex-btrblocks/src/compressor/integer/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,11 +713,16 @@ impl Scheme for DictScheme {
713713
ctx.descend(),
714714
Excludes::int_only(&new_excludes),
715715
)?;
716+
let compressed_values = compressor.compress_canonical(
717+
Canonical::Primitive(dict.values().to_primitive().narrow()?),
718+
ctx.descend(),
719+
Excludes::int_only(&new_excludes),
720+
)?;
716721

717-
// SAFETY: compressing codes does not change their values
722+
// SAFETY: Compressing the arrays does not change their logical values.
718723
unsafe {
719724
Ok(
720-
DictArray::new_unchecked(compressed_codes, dict.values().clone())
725+
DictArray::new_unchecked(compressed_codes, compressed_values)
721726
.set_all_values_referenced(dict.has_all_values_referenced())
722727
.into_array(),
723728
)

0 commit comments

Comments
 (0)