alamb commented on a change in pull request #1300:
URL: https://github.com/apache/arrow-datafusion/pull/1300#discussion_r749718863
##########
File path: datafusion/src/physical_plan/expressions/array_agg.rs
##########
@@ -120,7 +120,17 @@ impl Accumulator for ArrayAggAccumulator {
}
fn merge(&mut self, states: &[ScalarValue]) -> Result<()> {
- self.update(states)
+ if states.is_empty() {
+ return Ok(());
+ };
+
+ match &states[0] {
Review comment:
I think it would makes sense to assert here that `states.len() == 1`? so
we don't (silently) end up ignoring any other items that might be added
(accidentally / erroniously)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]