Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Nov 24, 2024
1 parent 4a2d2ad commit 321e330
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/array/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl ArrayImpl {
}

/// Hash the array into the given hasher.
pub fn hash(&self, hasher: &mut [impl Hasher]) {
pub fn hash_to(&self, hasher: &mut [impl Hasher]) {
assert_eq!(hasher.len(), self.len());
match self {
A::Null(a) => a.iter().zip(hasher).for_each(|(v, h)| v.hash(h)),
Expand Down
2 changes: 1 addition & 1 deletion src/executor/exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl HashPartitionProducer {
// calculate the hash
let keys_chunk = Evaluator::new(&self.keys).eval_list(&batch)?;
for column in keys_chunk.arrays() {
column.hash(&mut hashers);
column.hash_to(&mut hashers);
}
for (hasher, target) in hashers.iter().zip(&mut partition_indices) {
*target = hasher.finish() as usize % self.num_partitions;
Expand Down
4 changes: 2 additions & 2 deletions src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ impl PartitionedDispatcher {
Ok((chunk, partition)) => _ = txs[partition].broadcast(Ok(chunk)).await,
// broadcast the error to all partitions
Err(e) => {
for tx in txs.iter() {
for tx in &txs {
tx.broadcast(Err(e.clone())).await.unwrap();
}
}
Expand Down Expand Up @@ -826,7 +826,7 @@ impl ZippedPartitionedStream {
streams: self
.left
.into_iter()
.zip(self.right.into_iter())
.zip(self.right)
.map(|(l, r)| f(l, r))
.collect(),
}
Expand Down
2 changes: 1 addition & 1 deletion src/planner/rules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! | [`type_`] | | data type | [`Type`] |
//! | [`rows`] | | estimated rows | [`Rows`] |
//! | [`order`] | merge join | ordered keys | [`OrderKey`] |
//! | [`partition`] | to_parallel | data partition | [`Partition`] |
//! | [`partition`] | to parallel plan | data partition | [`Partition`] |
//!
//! It would be best if you have a background in program analysis.
//! Here is a recommended course: <https://pascal-group.bitbucket.io/teaching.html>.
Expand Down

0 comments on commit 321e330

Please sign in to comment.