-
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 dup alias in MATCH * Fix UT * Fix edge case
- Loading branch information
Showing
3 changed files
with
92 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright (c) 2022 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
# Issue link: https://github.com/vesoft-inc/nebula-ent/issues/1605 | ||
Feature: Duplicate alias in MATCH | ||
|
||
Background: | ||
Given a graph with space named "nba" | ||
|
||
Scenario: Duplicate node alias | ||
# expand from left to right | ||
When executing query: | ||
""" | ||
MATCH (n0)-[]->(n1)-[]->(n1) WHERE (id(n0) == "Tim Duncan") RETURN n1 | ||
""" | ||
Then the result should be, in any order: | ||
| n1 | | ||
# expand from right to left | ||
When executing query: | ||
""" | ||
MATCH (n1)<-[]-(n1)<-[]-(n0) WHERE (id(n0) == "Tim Duncan") RETURN n1 | ||
""" | ||
Then the result should be, in any order: | ||
| n1 | | ||
When executing query: | ||
""" | ||
MATCH (n0)-[]->(n1)-[]->(n1)-[]->(n1) WHERE (id(n0) == "Tim Duncan") RETURN n1 | ||
""" | ||
Then the result should be, in any order: | ||
| n1 | | ||
When executing query: | ||
""" | ||
MATCH (n0)-[]->(n1)-[]->(n1)-[]->(n1)-[]->(n1) WHERE (id(n0) == "Tim Duncan") RETURN n1 | ||
""" | ||
Then the result should be, in any order: | ||
| n1 | | ||
|
||
Scenario: Duplicate node alias expand both direction | ||
# expand from middle to both sides | ||
When executing query: | ||
""" | ||
MATCH (n1)-[]->(n0)-[]->(n1)-[]->(n1)-[]->(n1) WHERE (id(n0) == "Tim Duncan") RETURN n1 | ||
""" | ||
Then the result should be, in any order: | ||
| n1 | |