Skip to content

Commit cd71ceb

Browse files
authored
Merge branch 'main' into fix/dedup-stringview-buffers-collectleft-joins
2 parents 41d84a9 + 6bbd73a commit cd71ceb

3 files changed

Lines changed: 481 additions & 378 deletions

File tree

‎datafusion/physical-plan/src/aggregates/aggregate_hash_table/common.rs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,6 @@ impl<AggrMode> AggregateHashTable<AggrMode> {
410410
matches!(self.state, AggregateHashTableState::Building(_))
411411
}
412412

413-
pub(in crate::aggregates) fn is_done(&self) -> bool {
414-
matches!(self.state, AggregateHashTableState::Done)
415-
}
416-
417413
pub(super) fn start_outputting(&mut self) {
418414
let AggregateHashTableState::Building(mut state) =
419415
std::mem::replace(&mut self.state, AggregateHashTableState::Done)

‎datafusion/physical-plan/src/aggregates/mod.rs‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ impl From<StreamType> for SendableRecordBatchStream {
716716
match stream {
717717
StreamType::AggregateStream(stream) => Box::pin(stream),
718718
StreamType::PartialHash(stream) => stream.into_stream(),
719-
StreamType::PartialReduceHash(stream) => Box::pin(stream),
719+
StreamType::PartialReduceHash(stream) => stream.into_stream(),
720720
StreamType::FinalHash(stream) => stream.into_stream(),
721721
StreamType::SingleHash(stream) => stream.into_stream(),
722722
StreamType::OrderedPartialAggregate(stream) => stream.into_stream(),
@@ -6069,9 +6069,11 @@ mod tests {
60696069
let stream: SendableRecordBatchStream = stream.into();
60706070
let output = collect(stream).await?;
60716071

6072-
// Same flush cadence as the column-backed test: one flush per input
6073-
// batch, each sliced into batches of 2 and 1 rows.
6074-
assert_eq!(output.len(), 2 * num_input_batches);
6072+
// One flush per input batch. The memory limit only fits the table, so
6073+
// holding the materialized flush while slicing it does not fit and each
6074+
// flush is emitted whole instead of in `batch_size` slices.
6075+
assert_eq!(output.len(), num_input_batches);
6076+
assert!(output.iter().all(|batch| batch.num_rows() == 3));
60756077
assert_snapshot!(batches_to_string(&output), @r"
60766078
+---+---+-------------+
60776079
| a | n | SUM(b)[sum] |

0 commit comments

Comments
 (0)