Skip to content

Commit 521deb3

Browse files
committed
Clippy
1 parent 7c24cd7 commit 521deb3

File tree

1 file changed

+4
-4
lines changed
  • datafusion/physical-plan/src/repartition

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl BatchPartitioner {
277277
let arrays = exprs
278278
.iter()
279279
.map(|expr| {
280-
expr.evaluate(&batch)?.into_array(batch.num_rows())
280+
expr.evaluate(batch)?.into_array(batch.num_rows())
281281
})
282282
.collect::<Result<Vec<_>>>()?;
283283
hash_buffer.clear();
@@ -861,7 +861,7 @@ impl RepartitionExec {
861861
timer.done();
862862

863863
// Input is done
864-
let _ = match result {
864+
match result {
865865
Some(result) => {
866866
batches_buffer.push(result?);
867867
if is_hash_partitioning
@@ -874,7 +874,8 @@ impl RepartitionExec {
874874
None if batches_buffer.is_empty() => break,
875875
None => {}
876876
};
877-
for res in partitioner.partition_iter(batches_buffer.clone())? {
877+
let batches_buffer = std::mem::take(&mut batches_buffer);
878+
for res in partitioner.partition_iter(batches_buffer)? {
878879
let (partition, batch) = res?;
879880
let size = batch.get_array_memory_size();
880881

@@ -891,7 +892,6 @@ impl RepartitionExec {
891892
}
892893
timer.done();
893894
}
894-
batches_buffer.clear();
895895

896896
// If the input stream is endless, we may spin forever and
897897
// never yield back to tokio. See

0 commit comments

Comments
 (0)