Skip to content

Commit

Permalink
feat: add back ptype check for BitPackedArray (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y authored Sep 18, 2024
1 parent 88adc18 commit f14f45a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions encodings/fastlanes/src/bitpacking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ impl BitPackedArray {
offset: usize,
) -> VortexResult<Self> {
let dtype = DType::Primitive(ptype, validity.nullability());

if !dtype.is_unsigned_int() {
vortex_bail!(MismatchedTypes: "uint", &dtype);
}

if bit_width > u64::BITS as usize {
vortex_bail!("Unsupported bit width {}", bit_width);
}
Expand Down

0 comments on commit f14f45a

Please sign in to comment.