generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from cwida/80-make-label-label-optional
Adding LabelOptional rule
- Loading branch information
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
Submodule duckdb-pgq
updated
4 files
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,59 @@ | ||
# name: test/sql/sqlpgq/snb.test | ||
# group: [duckpgq] | ||
|
||
require duckpgq | ||
|
||
statement ok | ||
import database 'duckdb-pgq/data/SNB0.003'; | ||
|
||
statement ok | ||
-CREATE PROPERTY GRAPH snb | ||
VERTEX TABLES ( | ||
Person, | ||
Organisation IN typemask(company, university) | ||
) | ||
EDGE TABLES ( | ||
Person_knows_person SOURCE KEY (Person1Id) REFERENCES Person (id) | ||
DESTINATION KEY (Person2Id) REFERENCES Person (id) | ||
LABEL Knows, | ||
person_workAt_Organisation SOURCE KEY (PersonId) REFERENCES Person (id) | ||
DESTINATION KEY (OrganisationId) REFERENCES Organisation (id) | ||
LABEL workAt_Organisation | ||
); | ||
|
||
query III | ||
-FROM GRAPH_TABLE (snb | ||
MATCH (p:Person)-[w:workAt_Organisation]->(u:University) | ||
COLUMNS (p.id, u.id, u.type) | ||
) tmp | ||
limit 10; | ||
---- | ||
26388279066632 1580 University | ||
13194139533352 1856 University | ||
2199023255557 1953 University | ||
28587302322209 1596 University | ||
2199023255594 1597 University | ||
35184372088856 2208 University | ||
21990232555526 2209 University | ||
32985348833291 2211 University | ||
30786325577740 2435 University | ||
26388279066655 2832 University | ||
|
||
|
||
query II | ||
-FROM GRAPH_TABLE (snb | ||
MATCH (p:Person)-[k:knows]->(p2:Person) | ||
COLUMNS (p.id, p2.id) | ||
) tmp | ||
limit 10; | ||
---- | ||
14 10995116277782 | ||
14 24189255811081 | ||
14 26388279066668 | ||
16 2199023255594 | ||
16 26388279066655 | ||
16 28587302322180 | ||
16 28587302322204 | ||
32 2199023255594 | ||
32 13194139533352 | ||
32 17592186044461 |