-
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.
Fix/inner variable race condition (#4850)
* Fix list comprehension. * Fix hard code edge range inner variable. * Run multiple times for tests.
- Loading branch information
1 parent
b550d9f
commit a7e6e02
Showing
6 changed files
with
90 additions
and
32 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
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
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,25 @@ | ||
# Copyright (c) 2022 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: Inner Var Conflict | ||
|
||
Background: | ||
Given a graph with space named "nba" | ||
|
||
# The edge range will use same hard code innner variable name for list comprehension | ||
# It's not stable to reproduce, so run multiple times | ||
Scenario: Conflict hard code edge inner variable | ||
When executing query 100 times: | ||
""" | ||
MATCH (v)-[:like*1..2]->(v2) WHERE id(v) == 'Tim Duncan' | ||
MATCH (v)-[:serve*1..2]->(t) | ||
RETURN v.player.name, v2.player.name, t.team.name | ||
""" | ||
Then the result should be, in any order: | ||
| v.player.name | v2.player.name | t.team.name | | ||
| "Tim Duncan" | "Tony Parker" | "Spurs" | | ||
| "Tim Duncan" | "Manu Ginobili" | "Spurs" | | ||
| "Tim Duncan" | "LaMarcus Aldridge" | "Spurs" | | ||
| "Tim Duncan" | "Tim Duncan" | "Spurs" | | ||
| "Tim Duncan" | "Tim Duncan" | "Spurs" | | ||
| "Tim Duncan" | "Manu Ginobili" | "Spurs" | |
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