Skip to content

Commit

Permalink
delete unused keyword step (#5117)
Browse files Browse the repository at this point in the history
* delete unused keyword step

* fix test error

Co-authored-by: Sophie <[email protected]>
  • Loading branch information
nevermore3 and Sophie-Xie authored Dec 28, 2022
1 parent 6cb56c3 commit b85ae3c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/parser/scanner.lex
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ LABEL_FULL_WIDTH {CN_EN_FULL_WIDTH}{CN_EN_NUM_FULL_WIDTH}*
"LOOKUP" { return TokenType::KW_LOOKUP; }
"ALTER" { return TokenType::KW_ALTER; }
"STEPS" { return TokenType::KW_STEPS; }
"STEP" { return TokenType::KW_STEPS; }
"OVER" { return TokenType::KW_OVER; }
"UPTO" { return TokenType::KW_UPTO; }
"REVERSELY" { return TokenType::KW_REVERSELY; }
Expand Down
2 changes: 0 additions & 2 deletions src/parser/test/ScannerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ TEST(Scanner, Basic) {
CHECK_SEMANTIC_TYPE("update", TokenType::KW_UPDATE),
CHECK_SEMANTIC_TYPE("ALTER", TokenType::KW_ALTER),
CHECK_SEMANTIC_TYPE("alter", TokenType::KW_ALTER),
CHECK_SEMANTIC_TYPE("STEP", TokenType::KW_STEPS),
CHECK_SEMANTIC_TYPE("step", TokenType::KW_STEPS),
CHECK_SEMANTIC_TYPE("STEPS", TokenType::KW_STEPS),
CHECK_SEMANTIC_TYPE("steps", TokenType::KW_STEPS),
CHECK_SEMANTIC_TYPE("OVER", TokenType::KW_OVER),
Expand Down
12 changes: 6 additions & 6 deletions tests/tck/features/delete/DeleteVertexWithoutEdge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: delete vertex without edge
Then the execution should be successful
When executing query:
"""
GO 1 STEP FROM 1 OVER e YIELD e._dst AS dst, $^.t.id as id;
GO 1 STEPS FROM 1 OVER e YIELD e._dst AS dst, $^.t.id as id;
"""
Then the result should be, in any order:
| dst | id |
Expand All @@ -50,7 +50,7 @@ Feature: delete vertex without edge
| e |
When executing query:
"""
GO 1 STEP FROM 1 OVER e YIELD e._dst AS dst, $^.t.id as id
GO 1 STEPS FROM 1 OVER e YIELD e._dst AS dst, $^.t.id as id
"""
Then the result should be, in any order:
| dst | id |
Expand All @@ -61,7 +61,7 @@ Feature: delete vertex without edge
Then the execution should be successful
When executing query:
"""
GO 1 STEP FROM 1 OVER e YIELD e._dst AS dst, $^.t.id as id;
GO 1 STEPS FROM 1 OVER e YIELD e._dst AS dst, $^.t.id as id;
"""
Then the result should be, in any order:
| dst | id |
Expand All @@ -82,7 +82,7 @@ Feature: delete vertex without edge
Then the execution should be successful
When executing query:
"""
GO 1 STEP FROM 1 OVER e YIELD e._dst AS a, $^.t.id AS id;
GO 1 STEPS FROM 1 OVER e YIELD e._dst AS a, $^.t.id AS id;
"""
Then the result should be, in any order:
| a | id |
Expand All @@ -108,7 +108,7 @@ Feature: delete vertex without edge
| [:e 1->2 @0 {}] |
When executing query:
"""
GO 1 STEP FROM 1 OVER e YIELD e._dst AS b, $^.t.id as id;
GO 1 STEPS FROM 1 OVER e YIELD e._dst AS b, $^.t.id as id;
"""
Then the result should be, in any order:
| b | id |
Expand All @@ -121,7 +121,7 @@ Feature: delete vertex without edge
Then the execution should be successful
When executing query:
"""
GO 1 STEP FROM 1 OVER e YIELD e._dst AS c, $^.t.id as id;
GO 1 STEPS FROM 1 OVER e YIELD e._dst AS c, $^.t.id as id;
"""
Then the result should be, in any order:
| c | id |
Expand Down
10 changes: 5 additions & 5 deletions tests/tck/features/go/SimpleCase.feature
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ Feature: Simple case
| 0 | Start | | |
When profiling query:
"""
GO 1 to 3 STEP FROM "Tony Parker" OVER like WHERE $$.player.age > 40 YIELD DISTINCT id($$), $$.player.age as age, $$.player.name | ORDER BY $-.age
GO 1 to 3 STEPS FROM "Tony Parker" OVER like WHERE $$.player.age > 40 YIELD DISTINCT id($$), $$.player.age as age, $$.player.name | ORDER BY $-.age
"""
Then the result should be, in any order, with relax comparison:
| id($$) | age | $$.player.name |
Expand Down Expand Up @@ -452,7 +452,7 @@ Feature: Simple case
| 0 | Start | | |
When profiling query:
"""
GO 1 STEP FROM "Tony Parker" OVER * YIELD distinct id($$) as id| GO 3 STEP FROM $-.id OVER * YIELD distinct id($$) | YIELD COUNT(*)
GO 1 STEPS FROM "Tony Parker" OVER * YIELD distinct id($$) as id| GO 3 STEPS FROM $-.id OVER * YIELD distinct id($$) | YIELD COUNT(*)
"""
Then the result should be, in any order, with relax comparison:
| COUNT(*) |
Expand Down Expand Up @@ -550,7 +550,7 @@ Feature: Simple case
| 0 | Start | | |
When profiling query:
"""
GO 1 STEP FROM "Tony Parker" OVER like, serve REVERSELY WHERE id($$) != "Tim Duncan" YIELD DISTINCT id($$) | YIELD count(*)
GO 1 STEPS FROM "Tony Parker" OVER like, serve REVERSELY WHERE id($$) != "Tim Duncan" YIELD DISTINCT id($$) | YIELD count(*)
"""
Then the result should be, in any order, with relax comparison:
| count(*) |
Expand Down Expand Up @@ -592,7 +592,7 @@ Feature: Simple case
| 0 | Start | | |
When profiling query:
"""
GO 1 to 3 STEP FROM "Tony Parker" OVER like WHERE id($$) != "Tim Duncan" YIELD DISTINCT id($$), $$.player.age as age, $$.player.name | ORDER BY $-.age
GO 1 to 3 STEPS FROM "Tony Parker" OVER like WHERE id($$) != "Tim Duncan" YIELD DISTINCT id($$), $$.player.age as age, $$.player.name | ORDER BY $-.age
"""
Then the result should be, in any order, with relax comparison:
| id($$) | age | $$.player.name |
Expand All @@ -618,7 +618,7 @@ Feature: Simple case
| 0 | Start | | |
When profiling query:
"""
GO FROM "Yao Ming" OVER like YIELD DISTINCT id($$) AS aa | GO 1 to 3 STEP FROM $-.aa OVER like WHERE id($$) != "Tim Duncan" YIELD DISTINCT id($$), $$.player.age as age, $$.player.name | ORDER BY $-.age
GO FROM "Yao Ming" OVER like YIELD DISTINCT id($$) AS aa | GO 1 to 3 STEPS FROM $-.aa OVER like WHERE id($$) != "Tim Duncan" YIELD DISTINCT id($$), $$.player.age as age, $$.player.name | ORDER BY $-.age
"""
Then the result should be, in any order, with relax comparison:
| id($$) | age | $$.player.name |
Expand Down
2 changes: 1 addition & 1 deletion tests/tck/features/insert/insertVertexOnly.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Feature: insert vertex without tag
Then the execution should be successful
When executing query:
"""
GO 2 STEP FROM 1 OVER e yield e._dst AS dst;
GO 2 STEPS FROM 1 OVER e yield e._dst AS dst;
"""
Then the result should be, in any order:
| dst |
Expand Down

0 comments on commit b85ae3c

Please sign in to comment.