Skip to content

Commit

Permalink
FoR will compress signed array when min == 0 now (#511)
Browse files Browse the repository at this point in the history
Fixes #509 

Previously, FoR would bail out early if it detected that min == 0.
However, we still want to FoR encode when the array is signed, so that
we get a bitpackable unsigned array out of FoR compression
  • Loading branch information
a10y authored Jul 24, 2024
1 parent 28d6e17 commit 6fcafe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vortex-sampling-compressor/src/compressors/for.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl EncodingCompressor for FoRCompressor {
let shift = trailing_zeros(array);
match_each_integer_ptype!(parray.ptype(), |$P| {
let min: $P = parray.statistics().compute_min()?;
if min == 0 && shift == 0 {
if min == 0 && shift == 0 && parray.ptype().is_unsigned_int() {
return None;
}
});
Expand Down

0 comments on commit 6fcafe8

Please sign in to comment.