Skip to content

Commit ea716f8

Browse files
committed
remove unreachable cases in bitpack patches
Signed-off-by: Connor Tsui <[email protected]>
1 parent aafe376 commit ea716f8

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use vortex_array::patches::Patches;
1010
use vortex_dtype::{
1111
IntegerPType, NativePType, match_each_integer_ptype, match_each_unsigned_integer_ptype,
1212
};
13-
use vortex_error::VortexExpect;
13+
use vortex_error::{VortexExpect, vortex_panic};
1414
use vortex_mask::Mask;
1515
use vortex_scalar::Scalar;
1616

@@ -103,24 +103,12 @@ fn insert_values_and_validity_at_indices_to_uninit_range<
103103
indices_offset: usize,
104104
f: F,
105105
) {
106-
match values_validity {
107-
Mask::AllTrue(_) => {
108-
for (index, &value) in indices.iter().zip_eq(values) {
109-
dst.set_value(index.as_() - indices_offset, f(value));
110-
}
111-
}
112-
Mask::AllFalse(_) => {
113-
for decompressed_index in indices {
114-
dst.set_validity_bit(decompressed_index.as_() - indices_offset, false);
115-
}
116-
}
117-
Mask::Values(vb) => {
118-
for (index, &value) in indices.iter().zip_eq(values) {
119-
let out_index = index.as_() - indices_offset;
120-
dst.set_value(out_index, f(value));
121-
dst.set_validity_bit(out_index, vb.value(out_index));
122-
}
123-
}
106+
let Mask::AllTrue(_) = values_validity else {
107+
vortex_panic!("BitPackedArray somehow had nullable patch values");
108+
};
109+
110+
for (index, &value) in indices.iter().zip_eq(values) {
111+
dst.set_value(index.as_() - indices_offset, f(value));
124112
}
125113
}
126114

0 commit comments

Comments
 (0)