From 1d1c55f925bdc5900b2950fc3a0fca6a0bad42a8 Mon Sep 17 00:00:00 2001 From: jackwener Date: Wed, 26 Jan 2022 21:39:22 +0800 Subject: [PATCH] fix review --- src/graph/planner/SequentialPlanner.cpp | 4 +-- .../match/MultiLineMultiQueryParts.feature | 27 ------------------- .../features/match/MultiQueryParts.feature | 6 ++--- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/src/graph/planner/SequentialPlanner.cpp b/src/graph/planner/SequentialPlanner.cpp index 9207d5e8056..f7095d5fec6 100644 --- a/src/graph/planner/SequentialPlanner.cpp +++ b/src/graph/planner/SequentialPlanner.cpp @@ -25,7 +25,7 @@ StatusOr SequentialPlanner::transform(AstContext* astCtx) { ifBuildDataCollect(subPlan, qctx); for (auto iter = validators.begin(); iter < validators.end() - 1; ++iter) { // Remove left tail kStart plannode before append plan. - // It allows that kUse sentence append kMatch Sentence. + // It allows that kUse sentence to append kMatch Sentence. // For example: Use ...; Match ... rmLeftTailStartNode((iter + 1)->get(), iter->get()->sentence()->kind()); NG_RETURN_IF_ERROR((iter + 1)->get()->appendPlan(iter->get()->root())); @@ -65,7 +65,7 @@ void SequentialPlanner::ifBuildDataCollect(SubPlan& subPlan, QueryContext* qctx) } // When appending plans, it need to remove left tail plannode. -// Because the left tail plannode is StartNode that need to remove it, +// Because the left tail plannode is StartNode which needs to be removed, // and remain one size for add dependency // TODO: It's a temporary solution, remove it after Execute multiple sequences one by one. void SequentialPlanner::rmLeftTailStartNode(Validator* validator, Sentence::Kind appendPlanKind) { diff --git a/tests/tck/features/match/MultiLineMultiQueryParts.feature b/tests/tck/features/match/MultiLineMultiQueryParts.feature index 4408d41b9e4..bacd6370663 100644 --- a/tests/tck/features/match/MultiLineMultiQueryParts.feature +++ b/tests/tck/features/match/MultiLineMultiQueryParts.feature @@ -84,14 +84,6 @@ Feature: Multi Line Multi Query Parts | "Tim Duncan" | "Aron Baynes" | "Pistons" | "Grant Hill" | | "Tim Duncan" | "Aron Baynes" | "Spurs" | "Aron Baynes" | | "Tim Duncan" | "Aron Baynes" | "Spurs" | "Boris Diaw" | - # Below scenario is not suppoted for the execution plan has a scan. - When executing query: - """ - USE nba; - MATCH (m)-[]-(n), (a)-[]-(c) WHERE id(m)=="Tim Duncan" - RETURN m,n,a,c - """ - Then a ExecutionError should be raised at runtime: Scan vertices or edges need to specify a limit number, or limit number can not push down. Scenario: Multi Line Multi Match When executing query: @@ -189,15 +181,6 @@ Feature: Multi Line Multi Query Parts | "Tim Duncan" | "Manu Ginobili" | NULL | | "Tim Duncan" | "Manu Ginobili" | NULL | | "Tim Duncan" | "Manu Ginobili" | NULL | - # Below scenario is not suppoted for the execution plan has a scan. - When executing query: - """ - USE nba; - MATCH (m)-[]-(n) WHERE id(m)=="Tim Duncan" - OPTIONAL MATCH (a)<-[]-(b) - RETURN m.player.name AS n1, n.player.name AS n2, a.player.name AS n3 ORDER BY n1, n2, n3 LIMIT 10 - """ - Then a ExecutionError should be raised at runtime: Scan vertices or edges need to specify a limit number, or limit number can not push down. Scenario: Multi Line Multi Query Parts When executing query: @@ -244,16 +227,6 @@ Feature: Multi Line Multi Query Parts Then the result should be, in order: | scount | | 270 | - # Below scenario is not suppoted for the execution plan has a scan. - When executing query: - """ - USE nba; - MATCH (m)-[]-(n) WHERE id(m)=="Tim Duncan" - WITH n, n.player.name AS n1 ORDER BY n1 LIMIT 10 - MATCH (a)-[]-(b) - RETURN a.player.name AS n1, b.player.name AS n2 ORDER BY n1, n2 LIMIT 10 - """ - Then a ExecutionError should be raised at runtime: Scan vertices or edges need to specify a limit number, or limit number can not push down. Scenario: Multi Line Some Erros When executing query: diff --git a/tests/tck/features/match/MultiQueryParts.feature b/tests/tck/features/match/MultiQueryParts.feature index 07cdc177de6..16dff147631 100644 --- a/tests/tck/features/match/MultiQueryParts.feature +++ b/tests/tck/features/match/MultiQueryParts.feature @@ -80,7 +80,7 @@ Feature: Multi Query Parts | "Tim Duncan" | "Aron Baynes" | "Pistons" | "Grant Hill" | | "Tim Duncan" | "Aron Baynes" | "Spurs" | "Aron Baynes" | | "Tim Duncan" | "Aron Baynes" | "Spurs" | "Boris Diaw" | - # Below scenario is not suppoted for the execution plan has a scan. + # Below scenario is not supported for the execution plan has a scan. When executing query: """ MATCH (m)-[]-(n), (a)-[]-(c) WHERE id(m)=="Tim Duncan" @@ -179,7 +179,7 @@ Feature: Multi Query Parts | "Tim Duncan" | "Manu Ginobili" | NULL | | "Tim Duncan" | "Manu Ginobili" | NULL | | "Tim Duncan" | "Manu Ginobili" | NULL | - # Below scenario is not suppoted for the execution plan has a scan. + # Below scenario is not supported for the execution plan has a scan. When executing query: """ MATCH (m)-[]-(n) WHERE id(m)=="Tim Duncan" @@ -230,7 +230,7 @@ Feature: Multi Query Parts Then the result should be, in order: | scount | | 270 | - # Below scenario is not suppoted for the execution plan has a scan. + # Below scenario is not supported for the execution plan has a scan. When executing query: """ MATCH (m)-[]-(n) WHERE id(m)=="Tim Duncan"