Skip to content

Commit 91870b6

Browse files
committed
Clippy
1 parent 521deb3 commit 91870b6

File tree

1 file changed

+9
-0
lines changed
  • datafusion/physical-plan/src/repartition

1 file changed

+9
-0
lines changed

datafusion/physical-plan/src/repartition/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,15 @@ impl BatchPartitioner {
269269
num_partitions: partitions,
270270
hash_buffer,
271271
} => {
272+
if batches[0].num_columns() == 0 {
273+
// If no columns,
274+
let it: Box<
275+
dyn Iterator<Item = Result<(usize, RecordBatch)>> + Send,
276+
> = Box::new(
277+
batches.into_iter().map(|batch| Ok((0, batch.clone()))),
278+
);
279+
return Ok(it);
280+
}
272281
// Tracking time required for distributing indexes across output partitions
273282
let timer = self.timer.timer();
274283
let mut indices = vec![vec![]; *partitions];

0 commit comments

Comments
 (0)