kazuyukitanimura commented on code in PR #7400:
URL: https://github.com/apache/arrow-datafusion/pull/7400#discussion_r1326449210
##########
datafusion/core/src/physical_plan/aggregates/row_hash.rs:
##########
@@ -318,9 +433,12 @@ impl Stream for GroupedHashAggregateStream {
assert!(!self.input_done);
if let Some(to_emit) =
self.group_ordering.emit_to() {
- let batch = extract_ok!(self.emit(to_emit));
+ let batch = extract_ok!(self.emit(to_emit,
false));
self.exec_state =
ExecutionState::ProducingOutput(batch);
}
+
+ extract_ok!(self.emit_early_if_necessary());
Review Comment:
Good point, I was also thinking about this. I ended up choosing to keep the
if conditions at the inner scope in order to keep the outer scope clean as much
as possible. It is going to be likely I remove the
`matches!(self.group_ordering, GroupOrdering::None)` from
`spill_previous_if_necessary` and `emit_early_if_necessary`, and so that the
changes are only in those functions. But largely TBD
--
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]