jayzhan211 commented on PR #11943:
URL: https://github.com/apache/datafusion/pull/11943#issuecomment-2285818119
I think I'm not so familiar with the Emit::First and there is no block
implementation done yet. Could we emit every block size of values we have?
Something like Emit::First(block size).
We have `emit_early_if_necessary` that do First(n) emission when condition
met.
```rust
fn emit_early_if_necessary(&mut self) -> Result<()> {
if self.group_values.len() >= self.batch_size
&& matches!(self.group_ordering, GroupOrdering::None)
&& matches!(self.mode, AggregateMode::Partial)
&& self.update_memory_reservation().is_err()
{
let n = self.group_values.len() / self.batch_size *
self.batch_size;
let batch = self.emit(EmitTo::First(n), false)?;
self.exec_state = ExecutionState::ProducingOutput(batch);
}
Ok(())
}
```
If we emit every block size we accumulated, is it something similar to the
block approach? If not, what is the difference?
--
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]