feat: Support Decimal type in approx_distinct#23190
Conversation
e15371c to
bb405f7
Compare
approx_distinct
bb405f7 to
eef9d22
Compare
Jefffrey
left a comment
There was a problem hiding this comment.
lets add decimal32 & decimal64 as well
AFAIK no SQL Type mapping exists for datafusion/datafusion/functions-aggregate/src/count.rs Lines 195 to 200 in ff677c4 |
|
i dont think we should base support only on sql type mapping; for example this could be called via dataframe api, or if sql has arrow_cast, etc.
datafusion/datafusion/functions-aggregate/src/count.rs Lines 262 to 266 in ff677c4 |
ok, sounds good. |
4898a2d to
e2b4b8e
Compare
|
@Jefffrey Thank you for the review! |
|
thanks @mkleen |
Which issue does this PR close?
approx_distinctfunction #22989 but does not close it. More types are coming.Rationale for this change
Support the SQL
Decimaltype forapprox_distinctThe Arrow types
Decimal32,Decimal64,Decimal128andDecimal256can be directly supported forNumericHLLAccumulatorandHllGroupsAccumulatorWhat changes are included in this PR?
NumericHLLAccumulatorandHllGroupsAccumulatorto supportDecimal32,Decimal64,Decimal128andDecimal256.approx_distinct.rstandaggregate.sltforDecimal128andDecimal256Are these changes tested?
Yes
Are there any user-facing changes?
Yes,
approx_distinctsupports nowDecimalbut no breaking changes.