You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnot_impl_err!("MEDIAN(DISTINCT) aggregations are not available");
}
I guess this is just saying there isn't an explicit function implementation for this, since the plan will apply distinct first then the aggregation, like so:
Review if there's a need to do an explicit implementation of a distinct aggregation function (e.g. distinct_median) instead of relying on separate distinct -> median steps in the plan. Is it possible to implement a more efficient distinct median by doing it this way?
Describe alternatives you've considered
If decide not to implement an explicit function for distinct aggregates, update the above code to indicate this isn't a NotImplemented error but should instead be a plan or internal error, for clarity, and indicate in the error message that planning should have split it up.
Additional context
No response
The text was updated successfully, but these errors were encountered:
> select median(distinct "1"), median("1") from '/home/jeffrey/Downloads/data.csv';
This feature is not implemented: MEDIAN(DISTINCT) aggregations are not available
Looks like this is where the error can pop up, which might be a little confusing given that median(distinct "1")) by itself is fine. I guess will need to implement it then.
Is your feature request related to a problem or challenge?
When raising #10158 to close some old tickets, noticed in code base places where it states distinct aggregations are not supported when they are:
datafusion/datafusion/physical-expr/src/aggregate/build_in.rs
Lines 360 to 362 in 19356b2
I guess this is just saying there isn't an explicit function implementation for this, since the plan will apply distinct first then the aggregation, like so:
Describe the solution you'd like
Review if there's a need to do an explicit implementation of a distinct aggregation function (e.g. distinct_median) instead of relying on separate distinct -> median steps in the plan. Is it possible to implement a more efficient distinct median by doing it this way?
Describe alternatives you've considered
If decide not to implement an explicit function for distinct aggregates, update the above code to indicate this isn't a
NotImplemented
error but should instead be a plan or internal error, for clarity, and indicate in the error message that planning should have split it up.Additional context
No response
The text was updated successfully, but these errors were encountered: