diff --git a/src/graph/planner/SequentialPlanner.h b/src/graph/planner/SequentialPlanner.h index 4f60461ce04..656bede413e 100644 --- a/src/graph/planner/SequentialPlanner.h +++ b/src/graph/planner/SequentialPlanner.h @@ -6,8 +6,6 @@ #ifndef GRAPH_PLANNER_PLANNERS_SEQUENTIALPLANNER_H_ #define GRAPH_PLANNER_PLANNERS_SEQUENTIALPLANNER_H_ -#include - #include "graph/context/QueryContext.h" #include "graph/planner/Planner.h" diff --git a/src/graph/validator/Validator.cpp b/src/graph/validator/Validator.cpp index 34d35c78a67..1ded8d25335 100644 --- a/src/graph/validator/Validator.cpp +++ b/src/graph/validator/Validator.cpp @@ -7,8 +7,6 @@ #include -#include - #include "common/function/FunctionManager.h" #include "graph/planner/plan/PlanNode.h" #include "graph/planner/plan/Query.h" @@ -308,7 +306,7 @@ Status Validator::appendPlan(PlanNode* node, PlanNode* appended) { // Note: there's check which forbids sentence like `[dql(or other) ngql];[cypher]`. // So there's a kStart planNode in the cypher sentence of end. // But this check is not needed for `use space` or other sentence. - if (skipTypeSet.find(appended->kind()) != skipTypeSet.end() || !node->isSingleInput()) { + if (skipTypeSet.find(appended->kind()) == skipTypeSet.end() && !node->isSingleInput()) { return Status::SemanticError("PlanNode(%s) not support to append an input.", PlanNode::toString(node->kind())); } diff --git a/tests/tck/features/match/Base.feature b/tests/tck/features/match/Base.feature index 13573b18c47..449c548b8d4 100644 --- a/tests/tck/features/match/Base.feature +++ b/tests/tck/features/match/Base.feature @@ -699,3 +699,14 @@ Feature: Basic match Then the result should be, in any order: | v | | ("Tim Duncan":bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"}) | + + @wen + Scenario: Sequential sentence + When executing query: + """ + USE nba; + MATCH (n:player) RETURN n LIMIT 1; + """ + Then the result should be, in any order: + | n | + | ("Boris Diaw" :player{age: 36, name: "Boris Diaw"}) |