Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener committed Jan 26, 2022
1 parent 7be7d4a commit 1d1c55f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/graph/planner/SequentialPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ StatusOr<SubPlan> 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()));
Expand Down Expand Up @@ -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) {
Expand Down
27 changes: 0 additions & 27 deletions tests/tck/features/match/MultiLineMultiQueryParts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions tests/tck/features/match/MultiQueryParts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 1d1c55f

Please sign in to comment.