jayzhan211 commented on code in PR #10043:
URL:
https://github.com/apache/arrow-datafusion/pull/10043#discussion_r1560530372
##########
datafusion/physical-expr/src/aggregate/count_distinct/mod.rs:
##########
@@ -109,12 +109,14 @@ impl AggregateExpr for DistinctCount {
UInt16 =>
Box::new(PrimitiveDistinctCountAccumulator::<UInt16Type>::new()),
UInt32 =>
Box::new(PrimitiveDistinctCountAccumulator::<UInt32Type>::new()),
UInt64 =>
Box::new(PrimitiveDistinctCountAccumulator::<UInt64Type>::new()),
- Decimal128(_, _) => {
-
Box::new(PrimitiveDistinctCountAccumulator::<Decimal128Type>::new())
- }
- Decimal256(_, _) => {
-
Box::new(PrimitiveDistinctCountAccumulator::<Decimal256Type>::new())
- }
+ dt @ Decimal128(_, _) => Box::new(
+ PrimitiveDistinctCountAccumulator::<Decimal128Type>::new()
+ .with_data_type(dt.clone()),
+ ),
+ dt @ Decimal256(_, _) => Box::new(
+ PrimitiveDistinctCountAccumulator::<Decimal256Type>::new()
+ .with_data_type(dt.clone()),
+ ),
Review Comment:
I expect the test that shows the change is needed. If this change is
removed, it failed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]