Skip to content

Commit

Permalink
Also works with inheritance, fixes part of #41 and #80
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Feb 3, 2024
1 parent ad1716b commit ad912ce
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions test/sql/label_optional.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,40 @@ import database 'duckdb-pgq/data/SNB0.003';
statement ok
-CREATE PROPERTY GRAPH snb
VERTEX TABLES (
Person
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
);
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)
MATCH (p:Person)-[k:knows]->(p2:Person)
COLUMNS (p.id, p2.id)
) tmp
limit 10;
Expand Down

0 comments on commit ad912ce

Please sign in to comment.