-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support Avg distinct for float64 type
#15413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
datafusion/functions-aggregate-common/src/aggregate/avg_distinct/numeric.rs
Outdated
Show resolved
Hide resolved
… and remove unused sum_distinct module
|
the sqlite tests need updating prior to this issue being pushed to main. Confirmed test failures, here are a few examples: |
|
I merged up from main and will use the new github action to run extended tests |
|
Run extended tests |
I see it did trigger but I somehow was expecting feedback in the comments |
|
Looks like it failed? https://github.com/apache/datafusion/actions/runs/14139465370/job/39618247236 |
|
I regenerated the sqlite tests again and I think an issue I'm seeing with them is actually caused or triggered by this PR. Here is an example: query error DataFusion error: Arrow error: Invalid argument error: number of columns\(1\) must match number of fields\(2\) in schema
SELECT 84 * + - 61 * + AVG ( DISTINCT ( 70 ) ) AS col2 FROM tab4 WHERE ( NULL ) BETWEEN NULL AND col3If this is in fact a bug not caused by this PR a new issue should be filed. I myself do not have the time to diagnosis the cause of this unfortunately. |
sadly I'm working on my undergrad thesis project at this time and do not have time to investigate this either 😢 , might be back around mid april |
Good luck with your project / thesis! |
Which issue does this PR close?
avg(distinct)support #2408Rationale for this change
The original PR is splited into 2 parts, one for float64 type and one for float64+decimal type
What changes are included in this PR?
DistinctSumAccumulatorto common so that it can be used inFloat64DistinctAvgAccumulatorFloat64DistinctAvgAccumulatorusingDistinctSumAccumulatoraggregate.sltAre these changes tested?
aggregate.sltAre there any user-facing changes?
No