We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 521deb3 commit 91870b6Copy full SHA for 91870b6
datafusion/physical-plan/src/repartition/mod.rs
@@ -269,6 +269,15 @@ impl BatchPartitioner {
269
num_partitions: partitions,
270
hash_buffer,
271
} => {
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
+ }
281
// Tracking time required for distributing indexes across output partitions
282
let timer = self.timer.timer();
283
let mut indices = vec![vec![]; *partitions];
0 commit comments