generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for subquery ref and add tests
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
|
||
require duckpgq | ||
|
||
statement ok | ||
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);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);INSERT INTO School VALUES ('VU', 0, 'University'), ('UVA', 1, 'University'); | ||
|
||
statement ok | ||
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 | ||
VERTEX TABLES ( | ||
Student PROPERTIES ( id, name ) LABEL Person, | ||
School LABEL SCHOOL | ||
) | ||
EDGE TABLES ( | ||
know SOURCE KEY ( src ) REFERENCES Student ( id ) | ||
DESTINATION KEY ( dst ) REFERENCES Student ( id ), | ||
studyAt SOURCE KEY ( personId ) REFERENCES Student ( id ) | ||
DESTINATION KEY ( SchoolId ) REFERENCES School ( id ) | ||
); | ||
|
||
|
||
statement ok | ||
-select * from (select id, id_1 from graph_table ( pg match (p:person)-[k:know]->(p2:person) columns (p.id, p2.id))); |