Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lwwmanning committed Oct 9, 2024
1 parent 051de40 commit 1c656e8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions vortex-sampling-compressor/src/compressors/roaring_int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,23 @@ impl EncodingCompressor for RoaringIntCompressor {

#[cfg(test)]
mod tests {
use vortex::{array::PrimitiveArray, validity::Validity, IntoArray};
use vortex::array::PrimitiveArray;
use vortex::validity::Validity;
use vortex::IntoArray;
use vortex_roaring::RoaringIntArray;

use crate::{compressors::{roaring_int::RoaringIntCompressor, EncodingCompressor as _}, SamplingCompressor};
use crate::compressors::roaring_int::RoaringIntCompressor;
use crate::compressors::EncodingCompressor as _;
use crate::SamplingCompressor;

#[test]
fn test_roaring_int_compressor() {
let array = PrimitiveArray::from_vec(vec![1u32, 2, 3, 4, 5], Validity::NonNullable).into_array();
let array =
PrimitiveArray::from_vec(vec![1u32, 2, 3, 4, 5], Validity::NonNullable).into_array();
assert!(RoaringIntCompressor.can_compress(&array).is_some());
let compressed = RoaringIntCompressor.compress(&array, None, SamplingCompressor::default()).unwrap();
let compressed = RoaringIntCompressor
.compress(&array, None, SamplingCompressor::default())
.unwrap();
assert_eq!(compressed.array.len(), 5);
assert!(compressed.path.is_some());

Expand Down

0 comments on commit 1c656e8

Please sign in to comment.