This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-ballista.git
The following commit(s) were added to refs/heads/main by this push:
new 7fa2d841 fix clippy issues after update to rust 1.86 (#1225)
7fa2d841 is described below
commit 7fa2d841f534bfcdb6f8e334456cecb66bcf45ea
Author: Marko Milenković <[email protected]>
AuthorDate: Fri Apr 4 17:20:53 2025 +0100
fix clippy issues after update to rust 1.86 (#1225)
---
ballista/executor/src/executor.rs | 2 +-
ballista/executor/src/executor_server.rs | 7 ++-----
ballista/scheduler/src/scheduler_server/mod.rs | 2 +-
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/ballista/executor/src/executor.rs
b/ballista/executor/src/executor.rs
index 3eb762d7..a3901c13 100644
--- a/ballista/executor/src/executor.rs
+++ b/ballista/executor/src/executor.rs
@@ -45,7 +45,7 @@ impl Future for TasksDrainedFuture {
type Output = ();
fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Self::Output>
{
- if self.0.abort_handles.len() > 0 {
+ if !self.0.abort_handles.is_empty() {
Poll::Pending
} else {
Poll::Ready(())
diff --git a/ballista/executor/src/executor_server.rs
b/ballista/executor/src/executor_server.rs
index cfbc2bd4..bb898d6d 100644
--- a/ballista/executor/src/executor_server.rs
+++ b/ballista/executor/src/executor_server.rs
@@ -369,14 +369,11 @@ impl<T: 'static + AsLogicalPlan, U: 'static +
AsExecutionPlan> ExecutorServer<T,
debug!("Statistics: {:?}", execution_result);
let plan_metrics = query_stage_exec.collect_plan_metrics();
- let operator_metrics = match plan_metrics
+ let operator_metrics = plan_metrics
.into_iter()
.map(|m| m.try_into())
.collect::<Result<Vec<_>, BallistaError>>()
- {
- Ok(metrics) => Some(metrics),
- Err(_) => None,
- };
+ .ok();
let executor_id = &self.executor.metadata.id;
let end_exec_time = SystemTime::now()
diff --git a/ballista/scheduler/src/scheduler_server/mod.rs
b/ballista/scheduler/src/scheduler_server/mod.rs
index 653e2d41..4ec001d4 100644
--- a/ballista/scheduler/src/scheduler_server/mod.rs
+++ b/ballista/scheduler/src/scheduler_server/mod.rs
@@ -665,7 +665,7 @@ mod test {
}
fn test_executors(num_partitions: usize) -> Vec<(ExecutorMetadata,
ExecutorData)> {
- let task_slots = (num_partitions as u32 + 1) / 2;
+ let task_slots = (num_partitions as u32).div_ceil(2);
vec![
(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]