-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sophie <[email protected]>
- Loading branch information
1 parent
712884e
commit 85a2b43
Showing
4 changed files
with
116 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Copyright (c) 2020 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: Matching paths | ||
|
||
Background: | ||
Given load "test" csv data to a new space | ||
|
||
Scenario: distinct edges and paths | ||
When executing query: | ||
""" | ||
match p = (v:Label_0)-[e:Rel_0]-(v1:Label_1)-[e1:Rel_1]-(v2:Label_2), | ||
p = (v:Label_0)-[e:Rel_0]-(v1:Label_1)-[e1:Rel_1]-(v2:Label_2) | ||
return * | ||
""" | ||
Then a SemanticError should be raised at runtime: `e': Redefined alias | ||
When executing query: | ||
""" | ||
match p = (v:Label_0)-[e:Rel_0]-(v1:Label_1)-[e1:Rel_1]-(v2:Label_2), | ||
p = (v:Label_0)-[e2:Rel_0]-(v1:Label_1)-[e1:Rel_1]-(v2:Label_2) | ||
return * | ||
""" | ||
Then a SemanticError should be raised at runtime: `e1': Redefined alias | ||
When executing query: | ||
""" | ||
match p = (v:Label_0)-[e:Rel_0]-(v1:Label_1)-[e1:Rel_1]-(v2:Label_2), | ||
p = (v:Label_0)-[e2:Rel_0]-(v1:Label_1)-[er:Rel_1]-(v2:Label_2) | ||
return * | ||
""" | ||
Then a SemanticError should be raised at runtime: `p': Redefined alias | ||
When executing query: | ||
""" | ||
match p = (v:Label_5)-[e:Rel_0]-(v1:Label_1)-[e1:Rel_1]-(v2:Label_2), | ||
p2 = (v:Label_8)-[e2:Rel_0]-(v1:Label_1)-[e3:Rel_1]-(v2:Label_2) | ||
return count(p), count(p2) | ||
""" | ||
Then the result should be, in any order: | ||
| count(p) | count(p2) | | ||
| 966 | 966 | | ||
|
||
Scenario: symmetry paths | ||
When executing query: | ||
""" | ||
match p1 = (v1)-[e*1..2]->(v2) where id(v1) in [6] | ||
match p2 = (v2)-[e*1..2]->(v1) | ||
return count(*) | ||
""" | ||
Then the result should be, in any order: | ||
| count(*) | | ||
| 16 | | ||
When executing query: | ||
""" | ||
match p1 = (v1)-[e*1..2]->(v2) where id(v1) in [6] | ||
match p2 = (v2)-[e*1..2]->(v1) | ||
return size(e) | ||
""" | ||
Then the result should be, in any order: | ||
| size(e) | | ||
| 1 | | ||
| 1 | | ||
| 1 | | ||
| 1 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | | ||
| 2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2022 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: Push Filter Down Cases Using the test Space | ||
|
||
Background: | ||
Given load "test" csv data to a new space | ||
|
||
Scenario: push filter down hash join bug fix | ||
When profiling query: | ||
""" | ||
MATCH (v1:Label_6:Label_3)<-[e2:Rel_1]-(:Label_5)-[e3]->(v2) | ||
WHERE (id(v1) in [20, 28, 31, 6, 4, 18, 15, 25, 9, 19, 21]) | ||
MATCH p0 = (v2)<-[e4]-()-[e5]->(v3:Label_6) | ||
WITH min(v3.Label_6.Label_6_4_Int) AS pa0, | ||
v3.Label_6.Label_6_1_Bool AS pa2 | ||
WHERE pa2 | ||
RETURN pa2 | ||
""" | ||
Then the result should be, in any order: | ||
| pa2 | | ||
| true | | ||
And the execution plan should be: | ||
| id | name | dependencies | operator info | | ||
| 17 | project | 19 | | | ||
| 19 | aggregate | 24 | | | ||
| 24 | HashInnerJoin | 21,29 | | | ||
| 21 | project | 20 | | | ||
| 20 | filter | 6 | | | ||
| 6 | AppendVertices | 26 | | | ||
| 26 | Traverse | 25 | | | ||
| 25 | Traverse | 2 | | | ||
| 2 | Dedup | 1 | | | ||
| 1 | PassThrough | 3 | | | ||
| 3 | Start | | | | ||
| 29 | project | 28 | | | ||
| 28 | Filter | 27 | {"condition": "$-.v3.Label_6.Label_6_1_Bool"} | | ||
| 27 | AppendVertices | 11 | | | ||
| 11 | Traverse | 10 | | | ||
| 10 | Traverse | 9 | | | ||
| 9 | Argument | | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters