File tree Expand file tree Collapse file tree
functions-aggregate-common/src/aggregate/count_distinct Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,13 +170,13 @@ impl<T: ArrowPrimitiveType + Debug> Accumulator for FloatDistinctCountAccumulato
170170/// Uses 256 bytes to track all possible u8 values.
171171#[ derive( Debug ) ]
172172pub struct BoolArray256DistinctCountAccumulator {
173- seen : Box < [ bool ; 256 ] > ,
173+ seen : [ bool ; 256 ] ,
174174}
175175
176176impl BoolArray256DistinctCountAccumulator {
177177 pub fn new ( ) -> Self {
178178 Self {
179- seen : Box :: new ( [ false ; 256 ] ) ,
179+ seen : [ false ; 256 ] ,
180180 }
181181 }
182182
@@ -251,13 +251,13 @@ impl Accumulator for BoolArray256DistinctCountAccumulator {
251251/// Uses 256 bytes to track all possible i8 values (mapped to 0..255).
252252#[ derive( Debug ) ]
253253pub struct BoolArray256DistinctCountAccumulatorI8 {
254- seen : Box < [ bool ; 256 ] > ,
254+ seen : [ bool ; 256 ] ,
255255}
256256
257257impl BoolArray256DistinctCountAccumulatorI8 {
258258 pub fn new ( ) -> Self {
259259 Self {
260- seen : Box :: new ( [ false ; 256 ] ) ,
260+ seen : [ false ; 256 ] ,
261261 }
262262 }
263263
Original file line number Diff line number Diff line change @@ -174,12 +174,12 @@ impl Count {
174174}
175175fn get_count_accumulator ( data_type : & DataType ) -> Box < dyn Accumulator > {
176176 match data_type {
177- // Use optimized bitmap/bool array accumulators for small integer types
177+ // Optimized bitmap/bool array accumulators for small integer types
178178 DataType :: UInt8 => Box :: new ( BoolArray256DistinctCountAccumulator :: new ( ) ) ,
179179 DataType :: Int8 => Box :: new ( BoolArray256DistinctCountAccumulatorI8 :: new ( ) ) ,
180180 DataType :: UInt16 => Box :: new ( Bitmap65536DistinctCountAccumulator :: new ( ) ) ,
181181 DataType :: Int16 => Box :: new ( Bitmap65536DistinctCountAccumulatorI16 :: new ( ) ) ,
182- // Use HashSet-based accumulator for larger integer types
182+ // HashSet-based accumulator for larger integer types
183183 DataType :: Int32 => Box :: new ( PrimitiveDistinctCountAccumulator :: < Int32Type > :: new (
184184 data_type,
185185 ) ) ,
You can’t perform that action at this time.
0 commit comments