Skip to content

Conversation

AdamGS
Copy link
Contributor

@AdamGS AdamGS commented Oct 2, 2025

Which issue does this PR close?

Rationale for this change

Support avg(decimal), see original PR:

What changes are included in this PR?

See original PR:

  • DecimalDistinctAvgAccumulator implementation
  • Redid SLT tests to ensure single_distinct_to_groupby doesn't muddy the results
  • Fixed state_fields for Avg to account for DecimalDistinctAvgAccumulator having a different data type compared to eventual return type

Are these changes tested?

STL tests

Are there any user-facing changes?

No

* chore: mv `DistinctSumAccumulator` to common

* feat: add avg distinct support for float64 type

* chore: fmt

* refactor: update import for DataType in Float64DistinctAvgAccumulator and remove unused sum_distinct module

* feat: add avg distinct support for float64 type

* feat: add avg distinct support for decimal

* feat: more test for avg distinct in rust api

* Remove DataFrame API tests for avg(distinct)

* Remove proto test

* Fix merge errors

* Refactoring

* Minor cleanup

* Decimal slt tests for avg(distinct)

* Fix state_fields for decimal distinct avg

---------

Co-authored-by: YuNing Chen <admin@ynchen.me>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: Dmitrii Blaginin <dmitrii@blaginin.me>
@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Oct 2, 2025
@AdamGS
Copy link
Contributor Author

AdamGS commented Oct 2, 2025

FYI @xudong963, figured I will make a separate PR for each commit I want to backport to keep the branch's history clean, so this is the first one.

@alamb alamb mentioned this pull request Oct 2, 2025
22 tasks
@alamb
Copy link
Contributor

alamb commented Oct 3, 2025

Updated branch to get #17892

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AdamGS

@alamb
Copy link
Contributor

alamb commented Oct 3, 2025

i updated the description of this PR to refer to the original PR

@alamb alamb merged commit dae0e19 into apache:branch-50 Oct 3, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants