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_returnpull/24376/head
parent
549a267e3c
commit
d4a472f775
|
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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());
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue