parthchandra commented on code in PR #1922: URL: https://github.com/apache/datafusion-comet/pull/1922#discussion_r2167796799
########## native/spark-expr/src/agg_funcs/sum_decimal.rs: ########## @@ -375,11 +375,17 @@ impl GroupsAccumulator for SumDecimalGroupsAccumulator { // are null, in this case we'll return null // 2. if `is_empty` is false, but `null_state` is true, it means there's an overflow. In // non-ANSI mode Spark returns null. + let result = emit_to.take_needed(&mut self.sum); + result.iter().enumerate().for_each(|(i, &v)| { Review Comment: Makes sense. Thank you for the explanation! -- 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