From 6a5aa00e2c1174b7af840622e125ff6ffd19aa87 Mon Sep 17 00:00:00 2001 From: Nga Tran Date: Thu, 14 Oct 2021 17:11:37 -0400 Subject: [PATCH 1/3] chore: make the comments and names clearer --- query_tests/src/scenarios/util.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/query_tests/src/scenarios/util.rs b/query_tests/src/scenarios/util.rs index 8160f11b6d..5300589a9c 100644 --- a/query_tests/src/scenarios/util.rs +++ b/query_tests/src/scenarios/util.rs @@ -108,17 +108,17 @@ impl DeleteTime { // -------------------------------------------------------------------------------------------- -/// All scenarios chunk stages and their life cycle moves for given set of delete predicates -/// If the delete predicates are empty, all scenarios of different chunk stages will return +/// All scenarios chunk stages and their life cycle moves for given set of delete predicates. +/// If the delete predicates are empty, all scenarios of different chunk stages will be return. pub async fn all_scenarios_for_one_chunk( // These delete predicates are applied at all stages of the chunk life cycle chunk_stage_preds: Vec<&DeletePredicate>, // These delete predicates are applied to all chunks at their final stages at_end_preds: Vec<&DeletePredicate>, - // Single chunk data + // Tables data. One chunk will be created for each table lp_lines: Vec<&str>, - // Table of the chunk - table_name: &str, + // Table of the chunk that the delete predicates will be applied + delete_table_name: &str, // Partition of the chunk partition_key: &str, ) -> Vec { @@ -161,7 +161,7 @@ pub async fn all_scenarios_for_one_chunk( lp_lines.clone(), chunk_stage.clone(), preds, - table_name, + delete_table_name, partition_key, ) .await, From 39a556c5ebbc212f365f68835c5ed60231f67ac6 Mon Sep 17 00:00:00 2001 From: Nga Tran Date: Thu, 14 Oct 2021 17:21:11 -0400 Subject: [PATCH 2/3] chore: Apply suggestions from code review Co-authored-by: Andrew Lamb --- query_tests/src/scenarios/util.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/query_tests/src/scenarios/util.rs b/query_tests/src/scenarios/util.rs index 5300589a9c..7472b393b0 100644 --- a/query_tests/src/scenarios/util.rs +++ b/query_tests/src/scenarios/util.rs @@ -109,15 +109,16 @@ impl DeleteTime { // -------------------------------------------------------------------------------------------- /// All scenarios chunk stages and their life cycle moves for given set of delete predicates. -/// If the delete predicates are empty, all scenarios of different chunk stages will be return. +/// If the delete predicates are empty, all scenarios of different chunk stages will be returned. pub async fn all_scenarios_for_one_chunk( // These delete predicates are applied at all stages of the chunk life cycle chunk_stage_preds: Vec<&DeletePredicate>, // These delete predicates are applied to all chunks at their final stages at_end_preds: Vec<&DeletePredicate>, - // Tables data. One chunk will be created for each table + // Input data, formatted as line protocol. One chunk will be created for each measurement + // (table) that appears in the input lp_lines: Vec<&str>, - // Table of the chunk that the delete predicates will be applied + // Table to which the delete predicates will be applied delete_table_name: &str, // Partition of the chunk partition_key: &str, From b2d265dc51d0fc8031dbdb77c85e305b165e4f5a Mon Sep 17 00:00:00 2001 From: Nga Tran Date: Thu, 14 Oct 2021 17:31:42 -0400 Subject: [PATCH 3/3] chore: run format after accepting reviewer's suggestions --- query_tests/src/scenarios/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query_tests/src/scenarios/util.rs b/query_tests/src/scenarios/util.rs index 7472b393b0..e7f1eb97a9 100644 --- a/query_tests/src/scenarios/util.rs +++ b/query_tests/src/scenarios/util.rs @@ -115,7 +115,7 @@ pub async fn all_scenarios_for_one_chunk( chunk_stage_preds: Vec<&DeletePredicate>, // These delete predicates are applied to all chunks at their final stages at_end_preds: Vec<&DeletePredicate>, - // Input data, formatted as line protocol. One chunk will be created for each measurement + // Input data, formatted as line protocol. One chunk will be created for each measurement // (table) that appears in the input lp_lines: Vec<&str>, // Table to which the delete predicates will be applied