-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
3,211 additions
and
2,904 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
121 changes: 121 additions & 0 deletions
121
test/test_files/tinysnb/range_literal/range_literal.test
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,121 @@ | ||
-GROUP TinySnbReadTest | ||
-DATASET CSV tinysnb | ||
|
||
-- | ||
|
||
-CASE SingleUpperBound | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:knows*..2]->(b:person) RETURN e; | ||
---- 12 | ||
{_NODES: [], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf]}->(0:1)]} | ||
{_NODES: [], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph]}->(0:2)]} | ||
{_NODES: [], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434]}->(0:3)]} | ||
{_NODES: [{_ID: 0:1, _LABEL: person, ID: 2, fName: Bob, gender: 2, isStudent: True, isWorker: False, age: 30, eyeSight: 5.100000, birthdate: 1900-01-01, registerTime: 2008-11-03 15:25:30.000526, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [12,8], usedNames: [Bobby], courseScoresPerTerm: [[8,9],[9,10]], grades: [98,42,93,88], height: 0.990000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf]}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:3, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 10 years 5 months 13:00:00.000024, comments: [2huh9y89fsfw23,23nsihufhw723]}->(0:0)]} | ||
{_NODES: [{_ID: 0:1, _LABEL: person, ID: 2, fName: Bob, gender: 2, isStudent: True, isWorker: False, age: 30, eyeSight: 5.100000, birthdate: 1900-01-01, registerTime: 2008-11-03 15:25:30.000526, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [12,8], usedNames: [Bobby], courseScoresPerTerm: [[8,9],[9,10]], grades: [98,42,93,88], height: 0.990000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf]}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:4, date: 1950-05-14, meetTime: 1946-08-25 19:07:22, validInterval: 00:23:00, comments: [fwehu9h9832wewew,23u9h989sdfsss]}->(0:2)]} | ||
{_NODES: [{_ID: 0:1, _LABEL: person, ID: 2, fName: Bob, gender: 2, isStudent: True, isWorker: False, age: 30, eyeSight: 5.100000, birthdate: 1900-01-01, registerTime: 2008-11-03 15:25:30.000526, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [12,8], usedNames: [Bobby], courseScoresPerTerm: [[8,9],[9,10]], grades: [98,42,93,88], height: 0.990000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:0, date: 2021-06-30, meetTime: 1986-10-21 21:08:31.521, validInterval: 10 years 5 months 13:00:00.000024, comments: [rnme,m8sihsdnf2990nfiwf]}->(0:1),(0:1)-{_LABEL: knows, _ID: 3:5, date: 1950-05-14, meetTime: 2012-12-11 20:07:22, validInterval: 20 years 30 days 48:00:00, comments: [fwh9y81232uisuiehuf,ewnuihxy8dyf232]}->(0:3)]} | ||
{_NODES: [{_ID: 0:2, _LABEL: person, ID: 3, fName: Carol, gender: 1, isStudent: False, isWorker: True, age: 45, eyeSight: 5.000000, birthdate: 1940-06-22, registerTime: 1911-08-20 02:32:21, lastJobDuration: 48:24:11, workedHours: [4,5], usedNames: [Carmen,Fred], courseScoresPerTerm: [[8,10]], grades: [91,75,21,95], height: 1.000000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph]}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:6, date: 2021-06-30, meetTime: 2002-07-31 11:42:53.12342, validInterval: 40 days 30:00:00, comments: [fnioh8323aeweae34d,osd89e2ejshuih12]}->(0:0)]} | ||
{_NODES: [{_ID: 0:2, _LABEL: person, ID: 3, fName: Carol, gender: 1, isStudent: False, isWorker: True, age: 45, eyeSight: 5.000000, birthdate: 1940-06-22, registerTime: 1911-08-20 02:32:21, lastJobDuration: 48:24:11, workedHours: [4,5], usedNames: [Carmen,Fred], courseScoresPerTerm: [[8,10]], grades: [91,75,21,95], height: 1.000000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph]}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:7, date: 1950-05-14, meetTime: 2007-02-12 12:11:42.123, validInterval: 00:28:00.03, comments: [fwh983-sdjisdfji,ioh89y32r2huir]}->(0:1)]} | ||
{_NODES: [{_ID: 0:2, _LABEL: person, ID: 3, fName: Carol, gender: 1, isStudent: False, isWorker: True, age: 45, eyeSight: 5.000000, birthdate: 1940-06-22, registerTime: 1911-08-20 02:32:21, lastJobDuration: 48:24:11, workedHours: [4,5], usedNames: [Carmen,Fred], courseScoresPerTerm: [[8,10]], grades: [91,75,21,95], height: 1.000000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:1, date: 2021-06-30, meetTime: 1946-08-25 19:07:22, validInterval: 20 years 30 days 48:00:00, comments: [njnojppo9u0jkmf,fjiojioh9h9h89hph]}->(0:2),(0:2)-{_LABEL: knows, _ID: 3:8, date: 2000-01-01, meetTime: 1998-10-02 13:09:22.423, validInterval: 00:00:00.3, comments: [psh989823oaaioe,nuiuah1nosndfisf]}->(0:3)]} | ||
{_NODES: [{_ID: 0:3, _LABEL: person, ID: 5, fName: Dan, gender: 2, isStudent: False, isWorker: True, age: 20, eyeSight: 4.800000, birthdate: 1950-07-23, registerTime: 2031-11-30 12:25:30, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [1,9], usedNames: [Wolfeschlegelstein,Daniel], courseScoresPerTerm: [[7,4],[8,8],[9]], grades: [76,88,99,89], height: 1.300000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434]}->(0:3),(0:3)-{_LABEL: knows, _ID: 3:10, date: 1950-05-14, meetTime: 1982-11-11 13:12:05.123, validInterval: 00:23:00, comments: [fewh9182912e3,h9y8y89soidfsf,nuhudf78w78efw,hioshe0f9023sdsd]}->(0:1)]} | ||
{_NODES: [{_ID: 0:3, _LABEL: person, ID: 5, fName: Dan, gender: 2, isStudent: False, isWorker: True, age: 20, eyeSight: 4.800000, birthdate: 1950-07-23, registerTime: 2031-11-30 12:25:30, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [1,9], usedNames: [Wolfeschlegelstein,Daniel], courseScoresPerTerm: [[7,4],[8,8],[9]], grades: [76,88,99,89], height: 1.300000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434]}->(0:3),(0:3)-{_LABEL: knows, _ID: 3:11, date: 2000-01-01, meetTime: 1999-04-21 15:12:11.42, validInterval: 48:00:00.052, comments: [23h9sdslnfowhu2932,shuhf98922323sf]}->(0:2)]} | ||
{_NODES: [{_ID: 0:3, _LABEL: person, ID: 5, fName: Dan, gender: 2, isStudent: False, isWorker: True, age: 20, eyeSight: 4.800000, birthdate: 1950-07-23, registerTime: 2031-11-30 12:25:30, lastJobDuration: 10 years 5 months 13:00:00.000024, workedHours: [1,9], usedNames: [Wolfeschlegelstein,Daniel], courseScoresPerTerm: [[7,4],[8,8],[9]], grades: [76,88,99,89], height: 1.300000}], _RELS: [(0:0)-{_LABEL: knows, _ID: 3:2, date: 2021-06-30, meetTime: 2012-12-11 20:07:22, validInterval: 10 days, comments: [ioji232,jifhe8w99u43434]}->(0:3),(0:3)-{_LABEL: knows, _ID: 3:9, date: 2021-06-30, meetTime: 1936-11-02 11:02:01, validInterval: 00:00:00.00048, comments: [fwewe]}->(0:0)]} | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:knows*..1]->(b:person) RETURN b.fName; | ||
---- 3 | ||
Bob | ||
Carol | ||
Dan | ||
-STATEMENT MATCH(a:person {fName: "Greg"})-[e:knows*..1]->(b:person) RETURN b.fName; | ||
---- 0 | ||
# Different results from standard OpenCypher: 0 should be allowed | ||
|
||
-CASE SingleLowerBound | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*2..]->(b:person) RETURN a.fName, b.fName; | ||
---- 1 | ||
Alice|Dan | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*3..]->(b:person) RETURN a.fName, b.fName; | ||
---- 0 | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*1..]->(b:person) RETURN a.fName, b.fName; | ||
---- 2 | ||
Alice|Bob | ||
Alice|Dan | ||
|
||
-CASE SingleNodeBound | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*2]->(b:person) RETURN b.fName; | ||
---- 1 | ||
Dan | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*1]->(b:person) RETURN b.fName; | ||
---- 1 | ||
Bob | ||
-STATEMENT MATCH(a:person {fName: "Elizabeth"})-[e:meets*1]-(b:person) RETURN b.fName; | ||
---- 2 | ||
Carol | ||
Carol | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*3]->(b:person) RETURN b.fName; | ||
---- 0 | ||
|
||
-CASE BothBound | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*1..1]->(b:person) RETURN b.fName; | ||
---- 1 | ||
Bob | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)-[:meets]->(b:person {ID: 11, fName: "Mike"}); | ||
---- ok | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*1..3]->(b:person) RETURN b.fName; | ||
---- 3 | ||
Bob | ||
Dan | ||
Mike | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*2..3]->(b:person) RETURN b.fName; | ||
---- 2 | ||
Dan | ||
Mike | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*3..3]->(b:person) RETURN b.fName; | ||
---- 1 | ||
Mike | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*3..4]->(b:person) RETURN b.fName; | ||
---- 1 | ||
Mike | ||
|
||
-CASE SingleAsterisk | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)-[:meets]->(b:person {ID: 11, fName: "Mike"}); | ||
---- ok | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*]->(b:person) RETURN b.fName; | ||
---- 3 | ||
Bob | ||
Dan | ||
Mike | ||
-STATEMENT MATCH(a:person {fName: "Bob"})<-[e:meets*]-(b:person) RETURN b.fName; | ||
---- 2 | ||
Alice | ||
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff | ||
|
||
-CASE NoBound | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)-[:meets]->(b:person {ID: 11, fName: "Mike"}); | ||
---- ok | ||
-STATEMENT MATCH(a:person {fName: "Alice"})-[e:meets*..]->(b:person) RETURN b.fName; | ||
---- 3 | ||
Bob | ||
Dan | ||
Mike | ||
-STATEMENT MATCH(a:person {fName: "Bob"})<-[e:meets*..]-(b:person) RETURN b.fName; | ||
---- 2 | ||
Alice | ||
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff | ||
|
||
-CASE CreateRangeLiteralTest | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)-[:meets*]->(b:person {ID: 11, fName: "Mike"}); | ||
---- error | ||
QueryPlanner::getProperties | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)<-[:meets*..]-(b:person {ID: 11, fName: "Mike"}); | ||
---- error | ||
QueryPlanner::getProperties | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)-[:meets*2]-(b:person {ID: 11, fName: "Mike"}); | ||
---- error | ||
QueryPlanner::getProperties | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)-[:meets*2..4]->(b:person {ID: 11, fName: "Mike"}); | ||
---- error | ||
QueryPlanner::getProperties | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)<-[:meets*3..]-(b:person {ID: 11, fName: "Mike"}); | ||
---- error | ||
QueryPlanner::getProperties | ||
-STATEMENT MATCH (c:person) WHERE c.fName="Dan" CREATE(c)-[:meets*..3]->(b:person {ID: 11, fName: "Mike"}); | ||
---- error | ||
QueryPlanner::getProperties |
Oops, something went wrong.