We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cf899e commit 3a94cdaCopy full SHA for 3a94cda
1 file changed
datafusion/functions-aggregate/src/count.rs
@@ -337,7 +337,25 @@ impl AggregateUDFImpl for Count {
337
}
338
339
fn groups_accumulator_supported(&self, args: AccumulatorArgs) -> bool {
340
- args.exprs.len() == 1
+ if args.exprs.len() != 1 {
341
+ return false;
342
+ }
343
+ if args.is_distinct {
344
+ // Only support primitive integer types for now
345
+ matches!(
346
+ args.expr_fields[0].data_type(),
347
+ DataType::Int8
348
+ | DataType::Int16
349
+ | DataType::Int32
350
+ | DataType::Int64
351
+ | DataType::UInt8
352
+ | DataType::UInt16
353
+ | DataType::UInt32
354
+ | DataType::UInt64
355
+ )
356
+ } else {
357
+ true
358
359
360
361
fn create_groups_accumulator(
0 commit comments