jayzhan211 commented on code in PR #15867: URL: https://github.com/apache/datafusion/pull/15867#discussion_r2061907296
########## datafusion/optimizer/src/single_distinct_to_groupby.rs: ########## @@ -84,9 +87,11 @@ fn is_single_distinct_agg(aggr_expr: &[Expr]) -> Result<bool> { } aggregate_count += 1; if *distinct { + distinct_count += 1; for e in args { fields_set.insert(e); } + distinct_func = Some(Arc::clone(func)); Review Comment: we can record the name instead of the whole func -- 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