refactor: address review comments
parent
61ed67a5d9
commit
2f371b6f79
|
@ -188,7 +188,7 @@ impl Predicate {
|
|||
}
|
||||
|
||||
/// Merge the given delete predicates into this select predicate.
|
||||
/// Since we wan to eliminate data filtered by the delete predicates,
|
||||
/// Since we want to eliminate data filtered by the delete predicates,
|
||||
/// they are first converted into their negated form: NOT(delete_predicate)
|
||||
/// then added/merged into the selection one
|
||||
pub fn merge_delete_predicates<S>(&mut self, delete_predicates: &[S])
|
||||
|
@ -197,7 +197,7 @@ impl Predicate {
|
|||
{
|
||||
// Create a list of disjunctive negated expressions.
|
||||
// Example: there are two deletes as follows (note that time_range is stored separated in the Predicate
|
||||
// but we need to put it together with the exprs hee)
|
||||
// but we need to put it together with the exprs here)
|
||||
// . Delete_1: WHERE city != "Boston" AND temp = 70 AND time_range in [10, 30)
|
||||
// . Delete 2: WHERE state = "NY" AND route != "I90" AND time_range in [20, 50)
|
||||
// The negated list will be "NOT(Delete_1)", NOT(Delete_2)" which means
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,8 @@
|
|||
//! wired all the pieces together (as well as ensure any particularly
|
||||
//! important SQL does not regress)
|
||||
|
||||
use crate::scenarios;
|
||||
|
||||
use super::scenarios::*;
|
||||
use arrow::record_batch::RecordBatch;
|
||||
use arrow_util::assert_batches_sorted_eq;
|
||||
|
@ -823,21 +825,21 @@ async fn sql_select_with_deleted_data_from_one_expr() {
|
|||
|
||||
// Data deleted when it is in MUB, and then moved to RUB and OS
|
||||
run_sql_test_case!(
|
||||
DeleteFromMubOneMeasurementOneChunk {},
|
||||
scenarios::delete::DeleteFromMubOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
||||
// Data deleted when it is in RUB, and then moved OS
|
||||
run_sql_test_case!(
|
||||
DeleteFromRubOneMeasurementOneChunk {},
|
||||
scenarios::delete::DeleteFromRubOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
||||
// Data deleted when it is in OS
|
||||
run_sql_test_case!(
|
||||
DeleteFromOsOneMeasurementOneChunk {},
|
||||
scenarios::delete::DeleteFromOsOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
@ -856,21 +858,21 @@ async fn sql_select_with_deleted_data_from_multi_exprs() {
|
|||
|
||||
// Data deleted when it is in MUB, and then moved to RUB and OS
|
||||
run_sql_test_case!(
|
||||
DeleteMultiExprsFromMubOneMeasurementOneChunk {},
|
||||
scenarios::delete::DeleteMultiExprsFromMubOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
||||
// Data deleted when it is in RUB, and then moved OS
|
||||
run_sql_test_case!(
|
||||
DeleteMultiExprsFromRubOneMeasurementOneChunk {},
|
||||
scenarios::delete::DeleteMultiExprsFromRubOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
||||
// Data deleted when it is in OS
|
||||
run_sql_test_case!(
|
||||
DeleteMultiExprsFromOsOneMeasurementOneChunk {},
|
||||
scenarios::delete::DeleteMultiExprsFromOsOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
@ -888,21 +890,21 @@ async fn sql_select_with_two_deleted_data_from_multi_exprs() {
|
|||
|
||||
// Data deleted when it is in MUB, and then moved to RUB and OS
|
||||
run_sql_test_case!(
|
||||
TwoDeleteMultiExprsFromMubOneMeasurementOneChunk {},
|
||||
scenarios::delete::TwoDeleteMultiExprsFromMubOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
||||
// Data deleted when it is in RUB, and then moved OS
|
||||
run_sql_test_case!(
|
||||
TwoDeleteMultiExprsFromRubOneMeasurementOneChunk {},
|
||||
scenarios::delete::TwoDeleteMultiExprsFromRubOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
||||
// Data deleted when it is in OS
|
||||
run_sql_test_case!(
|
||||
TwoDeleteMultiExprsFromOsOneMeasurementOneChunk {},
|
||||
scenarios::delete::TwoDeleteMultiExprsFromOsOneMeasurementOneChunk {},
|
||||
"SELECT * from cpu",
|
||||
&expected
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue