jayzhan211 commented on code in PR #10526: URL: https://github.com/apache/datafusion/pull/10526#discussion_r1602380502
########## datafusion/physical-expr/src/aggregate/array_agg_distinct.rs: ########## @@ -153,12 +153,11 @@ impl Accumulator for DistinctArrayAggAccumulator { return Ok(()); } - let array = &states[0]; - - assert_eq!(array.len(), 1, "state array should only include 1 row!"); - // Unwrap outer ListArray then do update batch - let inner_array = array.as_list::<i32>().value(0); - self.update_batch(&[inner_array]) + states[0] + .as_list::<i32>() + .iter() + .flatten() Review Comment: yes -- 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