Skip to content

Commit

Permalink
moar
Browse files Browse the repository at this point in the history
  • Loading branch information
lwwmanning committed Oct 9, 2024
1 parent 70873d5 commit 2b4b64c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions encodings/roaring/src/integer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@ impl ArrayStatisticsCompute for RoaringIntArray {
return Ok(stats);
}

// possibly faster to write an accumulator over the iterator, though not necessarily
if stat == Stat::TrailingZeroFreq || stat == Stat::BitWidthFreq || stat == Stat::RunCount {
let primitive = PrimitiveArray::from_vec(self.bitmap().to_vec(), Validity::NonNullable);
let prim_stats = primitive.statistics().to_set();
stats.merge(&prim_stats);
if let Some(prim_stat) = primitive.statistics().compute(stat) {
stats.set(stat, prim_stat);
}
stats.merge(&primitive.statistics().to_set());
}

Ok(stats)
Expand Down

0 comments on commit 2b4b64c

Please sign in to comment.