Skip to content

Commit

Permalink
Cleanup and line wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Dec 8, 2022
1 parent 22e3ff9 commit eb5bbf8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
25 changes: 22 additions & 3 deletions tests/tck/features/bugfix/AliasTypeDeduce.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,40 @@ Feature: Test extract filter
Scenario: Extract filter bug
When executing query:
"""
match p=allShortestPaths((v1)-[:like*1..3]-(v2)) where id(v1)=="Tim Duncan" and id(v2)=="Tony Parker" with nodes(p) as pathNodes WITH [n IN pathNodes | id(n)] AS personIdsInPath, [idx IN range(1, size(pathNodes)-1) | [prev IN [pathNodes[idx-1]] | [curr IN [pathNodes[idx]] | [prev, curr]]]] AS vertList UNWIND vertList AS c WITH c[0][0][0] AS prev , c[0][0][1] AS curr OPTIONAL MATCH (curr)<-[e:like]-(:player)-[:serve]->(:team)-[:teammate]->(prev) RETURN count(e) AS cnt1, prev, curr
match p=allShortestPaths((v1)-[:like*1..3]-(v2))
where id(v1)=="Tim Duncan" and id(v2)=="Tony Parker"
with nodes(p) as pathNodes
WITH
[n IN pathNodes | id(n)] AS personIdsInPath,
[idx IN range(1, size(pathNodes)-1) | [prev IN [pathNodes[idx-1]] | [curr IN [pathNodes[idx]] | [prev, curr]]]] AS vertList
UNWIND vertList AS c
WITH c[0][0][0] AS prev , c[0][0][1] AS curr
OPTIONAL MATCH (curr)<-[e:like]-(:player)-[:serve]->(:team)-[:teammate]->(prev)
RETURN count(e) AS cnt1, prev, curr
"""
Then the result should be, in any order:
| cnt1 | prev | curr |
| 0 | ("Tim Duncan" :player{age: 42, name: "Tim Duncan"} :bachelor{name: "Tim Duncan", speciality: "psychology"}) | ("Tony Parker" :player{age: 36, name: "Tony Parker"}) |
When executing query:
"""
match p=(a:player)-[e:like*1..3]->(b) where b.player.age>42 with relationships(p)[1] AS e1 match (b)-[:serve]->(c) where c.team.name>"S" and (b)-[e1]->() return count(c)
match p=(a:player)-[e:like*1..3]->(b)
where b.player.age>42
with relationships(p)[1] AS e1
match (b)-[:serve]->(c)
where c.team.name>"S" and (b)-[e1]->()
return count(c)
"""
Then the result should be, in any order:
| count(c) |
| 3225 |
When executing query:
"""
match p=(a:player)-[e:like*1..3]->(b) where b.player.age>42 with relationships(p)[1..2][0] AS e1 match (b)-[:serve]->(c) where c.team.name>"S" and (b)-[e1]->() return count(c)
match p=(a:player)-[e:like*1..3]->(b)
where b.player.age>42
with relationships(p)[1..2][0] AS e1
match (b)-[:serve]->(c)
where c.team.name>"S" and (b)-[e1]->()
return count(c)
"""
Then the result should be, in any order:
| count(c) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,22 +222,6 @@ Feature: Push Filter down HashInnerJoin rule
| 8 | Traverse | 7 | |
| 7 | Argument | | |

# Depends on the PR #4973
# When profiling query:
# """
# match p=(a:player)-[e:like*1..3]->(b)
# where b.player.age>42
# with relationships(p)[1] AS e1
# match (b)-[:serve]->(c)
# where c.team.name>'S' and (b)-[e1]->()
# return c
# order by c
# limit 1
# """
# Then the result should be, in any order:
# | e | v2 |
# And the execution plan should be:
# | id | name | dependencies | operator info |
Scenario: NOT push filter down HashInnerJoin
When profiling query:
"""
Expand Down

0 comments on commit eb5bbf8

Please sign in to comment.