Skip to content

Commit 4344454

Browse files
committed
address clippies in root workspace
1 parent 171332f commit 4344454

File tree

10 files changed

+423
-416
lines changed

10 files changed

+423
-416
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ jobs:
116116
cargo test --no-default-features
117117
cargo run --example csv_sql
118118
cargo run --example parquet_sql
119-
# cargo run --example avro_sql --features=datafusion/avro
119+
#nopass
120+
cargo run --example avro_sql --features=datafusion/avro
120121
env:
121122
CARGO_HOME: "/github/home/.cargo"
122123
CARGO_TARGET_DIR: "/github/home/target"
@@ -127,6 +128,7 @@ jobs:
127128
export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
128129
cd ballista/rust
129130
# snmalloc requires cmake so build without default features
131+
#nopass
130132
cargo test --no-default-features --features sled
131133
env:
132134
CARGO_HOME: "/github/home/.cargo"

ballista/rust/executor/src/executor.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ impl Executor {
7878
job_id,
7979
stage_id,
8080
part,
81-
DisplayableExecutionPlan::with_metrics(&exec)
82-
.indent()
83-
.to_string()
81+
DisplayableExecutionPlan::with_metrics(&exec).indent()
8482
);
8583

8684
Ok(partitions)

ballista/rust/scheduler/src/planner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ mod test {
293293
.plan_query_stages(&job_uuid.to_string(), plan)
294294
.await?;
295295
for stage in &stages {
296-
println!("{}", displayable(stage.as_ref()).indent().to_string());
296+
println!("{}", displayable(stage.as_ref()).indent());
297297
}
298298

299299
/* Expected result:
@@ -407,7 +407,7 @@ order by
407407
.plan_query_stages(&job_uuid.to_string(), plan)
408408
.await?;
409409
for stage in &stages {
410-
println!("{}", displayable(stage.as_ref()).indent().to_string());
410+
println!("{}", displayable(stage.as_ref()).indent());
411411
}
412412

413413
/* Expected result:

benchmarks/src/bin/tpch.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,16 +540,14 @@ async fn execute_query(
540540
if debug {
541541
println!(
542542
"=== Physical plan ===\n{}\n",
543-
displayable(physical_plan.as_ref()).indent().to_string()
543+
displayable(physical_plan.as_ref()).indent()
544544
);
545545
}
546546
let result = collect(physical_plan.clone()).await?;
547547
if debug {
548548
println!(
549549
"=== Physical plan with metrics ===\n{}\n",
550-
DisplayableExecutionPlan::with_metrics(physical_plan.as_ref())
551-
.indent()
552-
.to_string()
550+
DisplayableExecutionPlan::with_metrics(physical_plan.as_ref()).indent()
553551
);
554552
print::print(&result);
555553
}

datafusion/src/physical_plan/expressions/rank.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub struct Rank {
3838
}
3939

4040
#[derive(Debug, Copy, Clone)]
41+
#[allow(clippy::enum_variant_names)]
4142
pub(crate) enum RankType {
4243
Rank,
4344
DenseRank,

datafusion/src/physical_plan/file_format/parquet.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,7 @@ macro_rules! get_min_max_values {
341341
};
342342

343343
let data_type = field.data_type();
344-
let null_scalar: ScalarValue = if let Ok(v) = data_type.try_into() {
345-
v
346-
} else {
347-
// DataFusion doesn't have support for ScalarValues of the column type
348-
return None
349-
};
344+
let null_scalar: ScalarValue = data_type.try_into().ok()?;
350345

351346
let scalar_values : Vec<ScalarValue> = $self.row_group_metadata
352347
.iter()

0 commit comments

Comments
 (0)