Skip to content

Commit 7b2d6ab

Browse files
Clippy fix
1 parent 12986a4 commit 7b2d6ab

File tree

1 file changed

+16
-17
lines changed
  • ballista/rust/core/src/serde/physical_plan

1 file changed

+16
-17
lines changed

ballista/rust/core/src/serde/physical_plan/mod.rs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl AsExecutionPlan for PhysicalPlanNode {
9595
match plan {
9696
PhysicalPlanType::Projection(projection) => {
9797
let input: Arc<dyn ExecutionPlan> =
98-
into_physical_plan!(projection.input, &ctx)?;
98+
into_physical_plan!(projection.input, ctx)?;
9999
let exprs = projection
100100
.expr
101101
.iter()
@@ -107,7 +107,7 @@ impl AsExecutionPlan for PhysicalPlanNode {
107107
}
108108
PhysicalPlanType::Filter(filter) => {
109109
let input: Arc<dyn ExecutionPlan> =
110-
into_physical_plan!(filter.input, &ctx)?;
110+
into_physical_plan!(filter.input, ctx)?;
111111
let predicate = filter
112112
.expr
113113
.as_ref()
@@ -121,36 +121,36 @@ impl AsExecutionPlan for PhysicalPlanNode {
121121
Ok(Arc::new(FilterExec::try_new(predicate, input)?))
122122
}
123123
PhysicalPlanType::CsvScan(scan) => Ok(Arc::new(CsvExec::new(
124-
decode_scan_config(scan.base_conf.as_ref().unwrap(), &ctx)?,
124+
decode_scan_config(scan.base_conf.as_ref().unwrap(), ctx)?,
125125
scan.has_header,
126126
str_to_byte(&scan.delimiter)?,
127127
))),
128128
PhysicalPlanType::ParquetScan(scan) => {
129129
Ok(Arc::new(ParquetExec::new(
130-
decode_scan_config(scan.base_conf.as_ref().unwrap(), &ctx)?,
130+
decode_scan_config(scan.base_conf.as_ref().unwrap(), ctx)?,
131131
// TODO predicate should be de-serialized
132132
None,
133133
)))
134134
}
135135
PhysicalPlanType::AvroScan(scan) => Ok(Arc::new(AvroExec::new(
136-
decode_scan_config(scan.base_conf.as_ref().unwrap(), &ctx)?,
136+
decode_scan_config(scan.base_conf.as_ref().unwrap(), ctx)?,
137137
))),
138138
PhysicalPlanType::CoalesceBatches(coalesce_batches) => {
139139
let input: Arc<dyn ExecutionPlan> =
140-
into_physical_plan!(coalesce_batches.input, &ctx)?;
140+
into_physical_plan!(coalesce_batches.input, ctx)?;
141141
Ok(Arc::new(CoalesceBatchesExec::new(
142142
input,
143143
coalesce_batches.target_batch_size as usize,
144144
)))
145145
}
146146
PhysicalPlanType::Merge(merge) => {
147147
let input: Arc<dyn ExecutionPlan> =
148-
into_physical_plan!(merge.input, &ctx)?;
148+
into_physical_plan!(merge.input, ctx)?;
149149
Ok(Arc::new(CoalescePartitionsExec::new(input)))
150150
}
151151
PhysicalPlanType::Repartition(repart) => {
152152
let input: Arc<dyn ExecutionPlan> =
153-
into_physical_plan!(repart.input, &ctx)?;
153+
into_physical_plan!(repart.input, ctx)?;
154154
match repart.partition_method {
155155
Some(PartitionMethod::Hash(ref hash_part)) => {
156156
let expr = hash_part
@@ -190,12 +190,12 @@ impl AsExecutionPlan for PhysicalPlanNode {
190190
}
191191
PhysicalPlanType::GlobalLimit(limit) => {
192192
let input: Arc<dyn ExecutionPlan> =
193-
into_physical_plan!(limit.input, &ctx)?;
193+
into_physical_plan!(limit.input, ctx)?;
194194
Ok(Arc::new(GlobalLimitExec::new(input, limit.limit as usize)))
195195
}
196196
PhysicalPlanType::LocalLimit(limit) => {
197197
let input: Arc<dyn ExecutionPlan> =
198-
into_physical_plan!(limit.input, &ctx)?;
198+
into_physical_plan!(limit.input, ctx)?;
199199
Ok(Arc::new(LocalLimitExec::new(input, limit.limit as usize)))
200200
}
201201
PhysicalPlanType::Window(window_agg) => {
@@ -247,7 +247,7 @@ impl AsExecutionPlan for PhysicalPlanNode {
247247
}
248248
PhysicalPlanType::HashAggregate(hash_agg) => {
249249
let input: Arc<dyn ExecutionPlan> =
250-
into_physical_plan!(hash_agg.input, &ctx)?;
250+
into_physical_plan!(hash_agg.input, ctx)?;
251251
let mode = protobuf::AggregateMode::from_i32(hash_agg.mode).ok_or_else(|| {
252252
proto_error(format!(
253253
"Received a HashAggregateNode message with unknown AggregateMode {}",
@@ -332,9 +332,9 @@ impl AsExecutionPlan for PhysicalPlanNode {
332332
}
333333
PhysicalPlanType::HashJoin(hashjoin) => {
334334
let left: Arc<dyn ExecutionPlan> =
335-
into_physical_plan!(hashjoin.left, &ctx)?;
335+
into_physical_plan!(hashjoin.left, ctx)?;
336336
let right: Arc<dyn ExecutionPlan> =
337-
into_physical_plan!(hashjoin.right, &ctx)?;
337+
into_physical_plan!(hashjoin.right, ctx)?;
338338
let on: Vec<(Column, Column)> = hashjoin
339339
.on
340340
.iter()
@@ -375,9 +375,9 @@ impl AsExecutionPlan for PhysicalPlanNode {
375375
}
376376
PhysicalPlanType::CrossJoin(crossjoin) => {
377377
let left: Arc<dyn ExecutionPlan> =
378-
into_physical_plan!(crossjoin.left, &ctx)?;
378+
into_physical_plan!(crossjoin.left, ctx)?;
379379
let right: Arc<dyn ExecutionPlan> =
380-
into_physical_plan!(crossjoin.right, &ctx)?;
380+
into_physical_plan!(crossjoin.right, ctx)?;
381381
Ok(Arc::new(CrossJoinExec::try_new(left, right)?))
382382
}
383383
PhysicalPlanType::ShuffleWriter(shuffle_writer) => {
@@ -417,8 +417,7 @@ impl AsExecutionPlan for PhysicalPlanNode {
417417
Ok(Arc::new(EmptyExec::new(empty.produce_one_row, schema)))
418418
}
419419
PhysicalPlanType::Sort(sort) => {
420-
let input: Arc<dyn ExecutionPlan> =
421-
into_physical_plan!(sort.input, &ctx)?;
420+
let input: Arc<dyn ExecutionPlan> = into_physical_plan!(sort.input, ctx)?;
422421
let exprs = sort
423422
.expr
424423
.iter()

0 commit comments

Comments
 (0)