eejbyfeldt commented on code in PR #7400:
URL: https://github.com/apache/datafusion/pull/7400#discussion_r1763852278
##########
datafusion/core/src/physical_plan/aggregates/mod.rs:
##########
@@ -1506,24 +1526,53 @@ mod tests {
let result =
common::collect(partial_aggregate.execute(0,
task_ctx.clone())?).await?;
- let expected = vec![
- "+---+-----+-----------------+",
- "| a | b | COUNT(1)[count] |",
- "+---+-----+-----------------+",
- "| | 1.0 | 2 |",
- "| | 2.0 | 2 |",
- "| | 3.0 | 2 |",
- "| | 4.0 | 2 |",
- "| 2 | | 2 |",
- "| 2 | 1.0 | 2 |",
- "| 3 | | 3 |",
- "| 3 | 2.0 | 2 |",
- "| 3 | 3.0 | 1 |",
- "| 4 | | 3 |",
- "| 4 | 3.0 | 1 |",
- "| 4 | 4.0 | 2 |",
- "+---+-----+-----------------+",
- ];
+ let expected = if spill {
+ vec![
+ "+---+-----+-----------------+",
Review Comment:
I think the reason is that we are comparing the output of a partial
aggregate and when `spill` we also have a lower desired batch size and hit the
emit early logic:
https://github.com/apache/datafusion/blob/5b6b404b9fbccb8584e8c5d2f1c366f3de736f31/datafusion/physical-plan/src/aggregates/row_hash.rs#L934-L945
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]