Skip to content

Commit

Permalink
Add failed piped fetch clause test case (#2552)
Browse files Browse the repository at this point in the history
* add failed piped fetch clause test case
* fix format error feature file

Co-authored-by: Yee <[email protected]>
  • Loading branch information
kikimo and yixinglu authored Aug 23, 2021
1 parent 2e7d75b commit f500d47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/tck/features/fetch/FetchVertices.intVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ Feature: Fetch Int Vid Vertices
GO FROM hash('Boris Diaw') over like YIELD like._dst as id, like._dst as id | FETCH PROP ON player $-.id YIELD player.name, player.age
"""
Then a SemanticError should be raised at runtime:
# only constant list or single colume of data is allowed in piped FETCH clause
When executing query:
"""
GO FROM 'Boris Diaw' over like YIELD like._src as src, like._dst as dst | FETCH PROP ON player $-.src, $-.dst;
"""
Then a SyntaxError should be raised at runtime:

Scenario: Different from v1.x
When executing query:
Expand Down
6 changes: 6 additions & 0 deletions tests/tck/features/fetch/FetchVertices.strVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ Feature: Fetch String Vertices
FETCH PROP ON * "Tim Duncan", "Boris Diaw" YIELD player.not_exist_prop
"""
Then a SemanticError should be raised at runtime:
# only constant list or single colume of data is allowed in piped FETCH clause
When executing query:
"""
GO FROM 'Boris Diaw' over like YIELD like._src as src, like._dst as dst | FETCH PROP ON player $-.src, $-.dst;
"""
Then a SyntaxError should be raised at runtime:

Scenario: Different from v1.x
When executing query:
Expand Down

0 comments on commit f500d47

Please sign in to comment.