Skip to content

Commit

Permalink
add tck
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener committed Jan 19, 2022
1 parent b93a399 commit 5ccddf0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/graph/planner/SequentialPlanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef GRAPH_PLANNER_PLANNERS_SEQUENTIALPLANNER_H_
#define GRAPH_PLANNER_PLANNERS_SEQUENTIALPLANNER_H_

#include <memory>

#include "graph/context/QueryContext.h"
#include "graph/planner/Planner.h"

Expand Down
4 changes: 1 addition & 3 deletions src/graph/validator/Validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <thrift/lib/cpp/util/EnumUtils.h>

#include <set>

#include "common/function/FunctionManager.h"
#include "graph/planner/plan/PlanNode.h"
#include "graph/planner/plan/Query.h"
Expand Down Expand Up @@ -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()));
}
Expand Down
11 changes: 11 additions & 0 deletions tests/tck/features/match/Base.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"}) |

0 comments on commit 5ccddf0

Please sign in to comment.