fix: Remove let bindings that are immediately returned

As now caught by clippy. https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
pull/24376/head
Carol (Nichols || Goulding) 2022-08-11 14:52:15 -04:00
parent 549a267e3c
commit d4a472f775
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
4 changed files with 8 additions and 17 deletions

View File

@ -464,8 +464,6 @@ mod tests {
value.into(), value.into(),
)); ));
let output = test_collect(exec as Arc<dyn ExecutionPlan>).await; test_collect(exec as Arc<dyn ExecutionPlan>).await
output
} }
} }

View File

@ -432,7 +432,7 @@ fn compute_batch(
let indices = indices.as_any().downcast_ref::<BooleanArray>().unwrap(); let indices = indices.as_any().downcast_ref::<BooleanArray>().unwrap();
// include null for last batch // include null for last batch
let batch = if last_batch && indices.null_count() > 0 { if last_batch && indices.null_count() > 0 {
// since !Null --> Null, but we want all the // since !Null --> Null, but we want all the
// remaining rows, that are not in true_indicies, // remaining rows, that are not in true_indicies,
// transform any nulls into true for this one // transform any nulls into true for this one
@ -441,8 +441,7 @@ fn compute_batch(
filter_record_batch(input_batch, &BooleanArray::from(mapped_indicies)) filter_record_batch(input_batch, &BooleanArray::from(mapped_indicies))
} else { } else {
filter_record_batch(input_batch, indices) filter_record_batch(input_batch, indices)
}?; }?
batch
} }
ColumnarValue::Scalar(ScalarValue::Boolean(val)) => { ColumnarValue::Scalar(ScalarValue::Boolean(val)) => {
let empty_record_batch = RecordBatch::new_empty(input_batch.schema()); let empty_record_batch = RecordBatch::new_empty(input_batch.schema());

View File

@ -241,7 +241,7 @@ impl DbSetup for ThreeDeleteThreeChunks {
// Scenarios // Scenarios
// All threee deletes will be applied to every chunk but due to their predicates, // All threee deletes will be applied to every chunk but due to their predicates,
// only appropriate data is deleted // only appropriate data is deleted
let scenarios = make_n_chunks_scenario(&[ make_n_chunks_scenario(&[
ChunkData { ChunkData {
lp_lines: lp_lines_1, lp_lines: lp_lines_1,
preds: preds.clone(), preds: preds.clone(),
@ -264,8 +264,6 @@ impl DbSetup for ThreeDeleteThreeChunks {
..Default::default() ..Default::default()
}, },
]) ])
.await; .await
scenarios
} }
} }

View File

@ -506,9 +506,7 @@ impl DbSetup for ManyFieldsSeveralChunks {
..Default::default() ..Default::default()
}; };
let scenarios = make_n_chunks_scenario(&[c1, c2, c3, c4, c5]).await; make_n_chunks_scenario(&[c1, c2, c3, c4, c5]).await
scenarios
} }
} }
@ -591,7 +589,7 @@ impl DbSetup for OneMeasurementFourChunksWithDuplicates {
"h2o,state=CA,city=SJ min_temp=75.5,max_temp=84.08 700", "h2o,state=CA,city=SJ min_temp=75.5,max_temp=84.08 700",
]; ];
let scenarios = make_n_chunks_scenario(&[ make_n_chunks_scenario(&[
ChunkData { ChunkData {
lp_lines: lp_lines1, lp_lines: lp_lines1,
partition_key, partition_key,
@ -613,9 +611,7 @@ impl DbSetup for OneMeasurementFourChunksWithDuplicates {
..Default::default() ..Default::default()
}, },
]) ])
.await; .await
scenarios
} }
} }