Jefffrey commented on code in PR #10226: URL: https://github.com/apache/datafusion/pull/10226#discussion_r1579249973
########## datafusion/physical-expr/src/aggregate/median.rs: ########## @@ -196,6 +184,192 @@ impl<T: ArrowNumericType> Accumulator for MedianAccumulator<T> { } } +/// MEDIAN(DISTINCT) aggregate expression. Similar to MEDIAN but computes after taking +/// all unique values. This may use a lot of memory if the cardinality is high. +#[derive(Debug)] +pub struct DistinctMedian { Review Comment: Lot of this code is duplicated with above median, but figured that since it's only duplicated once it should be fine? Or can macro it I suppose. Also colocated within existing `median.rs` file for this reason, to make it clear how similar they are. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org