goldmedal commented on code in PR #10851: URL: https://github.com/apache/datafusion/pull/10851#discussion_r1632615003
########## datafusion/physical-expr/src/aggregate/hyperloglog.rs: ########## @@ -115,6 +115,7 @@ where /// Get the register histogram (each value in register index into /// the histogram; u32 is enough because we only have 2**14=16384 registers + #[allow(dead_code)] Review Comment: After moving to `function-aggregate`, I think we can remove the original file `datafusion/physical-expr/src/aggregate/hyperloglog.rs`. ########## datafusion/physical-expr/src/expressions/mod.rs: ########## @@ -64,6 +63,7 @@ pub use crate::window::ntile::Ntile; pub use crate::window::rank::{dense_rank, percent_rank, rank, Rank, RankType}; pub use crate::window::row_number::RowNumber; pub use crate::PhysicalSortExpr; +pub use datafusion_functions_aggregate::approx_distinct::ApproxDistinct; Review Comment: I guess we don't need to public use it. ########## datafusion/functions-aggregate/src/approx_distinct.rs: ########## @@ -304,3 +223,88 @@ where default_accumulator_impl!(); } + +impl Debug for ApproxDistinct { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ApproxDistinct") + .field("name", &self.name()) + .field("signature", &self.signature) + .finish() + } +} + +impl Default for ApproxDistinct { + fn default() -> Self { + Self::new() + } +} + +pub struct ApproxDistinct { + signature: Signature, + alias: Vec<String>, Review Comment: ApproxDistinct has no any alias. I think we can just remove this field and use default `AggregateUDFImpl::alias` -- 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