jayzhan211 commented on issue #26705: URL: https://github.com/apache/datafusion/issues/26705#issuecomment-7235043441
@yashdotrv not yet. #27129 reserves the state batch the final aggregate is merging, but the other partial states still wait unreserved in front of it. `CoalescePartitionsExec` queues up to one batch per input partition in its channel ([coalesce_partitions.rs#L248-L249](https://github.com/apache/datafusion/blob/d2f63210c81a79d2d9d04bea6cf1400e9356eb27/datafusion/physical-plan/src/coalesce_partitions.rs#L248-L249)), and each partial aggregate frees its reservation as soon as its batch is in that channel. So with 4 partitions, three `median` states can sit unreserved while the final aggregate merges the first. I'll keep this open for that part. Would you like to pick that up too? One direction is to keep a queued batch reserved until the consumer takes it, since the contract in `memory_pool/mod.rs` makes whoever holds a batch responsible for it. -- 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]
