Skip to content

Commit

Permalink
Add order by to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Mar 28, 2024
1 parent fbaac48 commit 499c8d6
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions test/sql/pattern_matching/basic_match.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,16 @@ pragma enable_verification
require duckpgq

statement ok
CREATE TABLE Student(id BIGINT, name VARCHAR);
CREATE TABLE Student(id BIGINT, name VARCHAR);INSERT INTO Student VALUES (0, 'Daniel'), (1, 'Tavneet'), (2, 'Gabor'), (3, 'Peter'), (4, 'David');

statement ok
CREATE TABLE know(src BIGINT, dst BIGINT, createDate BIGINT);
CREATE TABLE know(src BIGINT, dst BIGINT, createDate BIGINT);INSERT INTO know VALUES (0,1, 10), (0,2, 11), (0,3, 12), (3,0, 13), (1,2, 14), (1,3, 15), (2,3, 16), (4,3, 17);

statement ok
CREATE TABLE School(name VARCHAR, Id BIGINT, Kind VARCHAR);
CREATE TABLE School(name VARCHAR, Id BIGINT, Kind VARCHAR);INSERT INTO School VALUES ('VU', 0, 'University'), ('UVA', 1, 'University');

statement ok
CREATE TABLE StudyAt(personId BIGINT, schoolId BIGINT);

statement ok
INSERT INTO Student VALUES (0, 'Daniel'), (1, 'Tavneet'), (2, 'Gabor'), (3, 'Peter'), (4, 'David');

statement ok
INSERT INTO know VALUES (0,1, 10), (0,2, 11), (0,3, 12), (3,0, 13), (1,2, 14), (1,3, 15), (2,3, 16), (4,3, 17);

statement ok
INSERT INTO School VALUES ('VU', 0, 'University'), ('UVA', 1, 'University');

statement ok
INSERT INTO StudyAt VALUES (0, 0), (1, 0), (2, 1), (3, 1), (4, 1);
CREATE TABLE StudyAt(personId BIGINT, schoolId BIGINT);INSERT INTO StudyAt VALUES (0, 0), (1, 0), (2, 1), (3, 1), (4, 1);

statement ok
-CREATE PROPERTY GRAPH pg
Expand Down Expand Up @@ -271,13 +259,14 @@ FROM GRAPH_TABLE (pg
MATCH
(a:PERSON)-[k:knows]->(b:person)
COLUMNS (*)
) study;
) study
ORDER BY study.id, study.name;
----
3 0 13 0 Daniel 3 Peter
0 1 10 1 Tavneet 0 Daniel
0 2 11 2 Gabor 0 Daniel
0 3 12 3 Peter 0 Daniel
3 0 13 0 Daniel 3 Peter
1 2 14 2 Gabor 1 Tavneet
0 3 12 3 Peter 0 Daniel
1 3 15 3 Peter 1 Tavneet
2 3 16 3 Peter 2 Gabor
4 3 17 3 Peter 4 David
Expand All @@ -288,15 +277,16 @@ FROM GRAPH_TABLE (pg
MATCH
(a:PERSON)-[k:knows]->(b:person)
COLUMNS (a.*)
) study;
) study
ORDER BY study.id;
----
0 Daniel
0 Daniel
0 Daniel
3 Peter
1 Tavneet
1 Tavneet
2 Gabor
3 Peter
4 David

query II
Expand Down

0 comments on commit 499c8d6

Please sign in to comment.