File tree Expand file tree Collapse file tree
datafusion/functions-aggregate Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ fn approx_distinct_benchmark(c: &mut Criterion) {
169169 }
170170 }
171171
172- // --- Bitmap type benchmarks (our optimization) ---
172+ // Small integer types
173173
174174 // UInt8
175175 let values = Arc :: new ( create_u8_array ( 200 ) ) as ArrayRef ;
Original file line number Diff line number Diff line change @@ -658,7 +658,7 @@ impl AggregateUDFImpl for ApproxDistinct {
658658 let data_type = acc_args. expr_fields [ 0 ] . data_type ( ) ;
659659
660660 let accumulator: Box < dyn Accumulator > = match data_type {
661- // Testing bool array for u8
661+ // Use bitmap accumulators for small integer types
662662 DataType :: UInt8 => Box :: new ( BoolArray256Accumulator :: new ( ) ) ,
663663 DataType :: UInt16 => Box :: new ( Bitmap65536Accumulator :: new ( ) ) ,
664664 DataType :: UInt32 => Box :: new ( NumericHLLAccumulator :: < UInt32Type > :: new ( ) ) ,
You can’t perform that action at this time.
0 commit comments