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 branch 'refs/heads/main' into pathfindingoperator
- Loading branch information
Showing
7 changed files
with
159 additions
and
28 deletions.
There are no files selected for viewing
Submodule duckdb-pgq
updated
1256 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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 LABEL Person | ||
) | ||
EDGE TABLES ( | ||
Person_knows_person SOURCE KEY (Person1Id) REFERENCES Person (id) | ||
DESTINATION KEY (Person2Id) REFERENCES Person (id) | ||
LABEL Knows | ||
); | ||
|
||
# Fails because University is not registered | ||
statement error | ||
-FROM GRAPH_TABLE(snb MATCH (a:Person)-[w:workAt_Organisation]->(u:University)) limit 10; | ||
---- | ||
Binder Error: The label university is not registered in property graph snb | ||
|
||
statement ok | ||
-CREATE OR REPLACE PROPERTY GRAPH snb | ||
VERTEX TABLES ( | ||
Person LABEL Person, | ||
Organisation LABEL 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 | ||
); | ||
|
||
statement ok | ||
-FROM GRAPH_TABLE(snb MATCH (a:Person)-[w:workAt_Organisation]->(u:University)) limit 10; |
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,88 @@ | ||
# 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 LABEL Person, | ||
Organisation LABEL 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 IIIIIIIIIII | ||
-FROM GRAPH_TABLE (snb MATCH (p:Person)) limit 1; | ||
---- | ||
2010-01-03 23:10:31.499+00 14 Hossein Forouhar male 1984-03-11 77.245.239.11 Firefox 1166 fa;ku;en [email protected] | ||
|
||
query I | ||
-FROM GRAPH_TABLE (snb MATCH (p:Person) COLUMNS (p.id)) limit 10; | ||
---- | ||
14 | ||
16 | ||
32 | ||
2199023255557 | ||
2199023255573 | ||
2199023255594 | ||
4398046511139 | ||
6597069766702 | ||
8796093022234 | ||
8796093022237 | ||
|
||
query I | ||
-SELECT p_id FROM GRAPH_TABLE (snb MATCH (p:Person) COLUMNS (p.id as p_id,)) limit 10; | ||
---- | ||
14 | ||
16 | ||
32 | ||
2199023255557 | ||
2199023255573 | ||
2199023255594 | ||
4398046511139 | ||
6597069766702 | ||
8796093022234 | ||
8796093022237 | ||
|
||
query I | ||
-FROM GRAPH_TABLE (snb MATCH (p:Person) COLUMNS (p.id as p_id)) limit 10; | ||
---- | ||
14 | ||
16 | ||
32 | ||
2199023255557 | ||
2199023255573 | ||
2199023255594 | ||
4398046511139 | ||
6597069766702 | ||
8796093022234 | ||
8796093022237 | ||
|
||
query II | ||
-FROM GRAPH_TABLE (snb MATCH (p:Person) COLUMNS (p.id, p.firstname as first_name)) limit 10; | ||
---- | ||
14 Hossein | ||
16 Jan | ||
32 Miguel | ||
2199023255557 Eric | ||
2199023255573 Arbaaz | ||
2199023255594 Ali | ||
4398046511139 Ayesha | ||
6597069766702 Alejandro | ||
8796093022234 Rahul | ||
8796093022237 Lei | ||
|
||
query I | ||
-SELECT count(*) FROM GRAPH_TABLE (snb MATCH (p:Person)) GROUP BY ALL limit 10; | ||
---- | ||
50 |
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