From caf1d4b0153d43acfa351c5bdb392dedd4a2c42f Mon Sep 17 00:00:00 2001 From: dtenwolde Date: Mon, 5 Feb 2024 16:46:36 +0100 Subject: [PATCH 1/2] Change parser to make EdgeTableClause optional --- duckdb-pgq | 2 +- test/sql/create_pg/optional_edge_table_clause.test | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 test/sql/create_pg/optional_edge_table_clause.test diff --git a/duckdb-pgq b/duckdb-pgq index 3e2ceda5..82a05987 160000 --- a/duckdb-pgq +++ b/duckdb-pgq @@ -1 +1 @@ -Subproject commit 3e2ceda52eca1e84a49f1310de22bfbd6ea218ed +Subproject commit 82a059870aa81cd8c72f9d75123e69e1430bbcf5 diff --git a/test/sql/create_pg/optional_edge_table_clause.test b/test/sql/create_pg/optional_edge_table_clause.test new file mode 100644 index 00000000..c1693191 --- /dev/null +++ b/test/sql/create_pg/optional_edge_table_clause.test @@ -0,0 +1,13 @@ +# 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 (Message); + +statement ok From 77536d8224f7064b39aac04056d5756e992d4352 Mon Sep 17 00:00:00 2001 From: dtenwolde Date: Mon, 5 Feb 2024 16:48:48 +0100 Subject: [PATCH 2/2] Add more tests --- test/sql/create_pg/optional_edge_table_clause.test | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/sql/create_pg/optional_edge_table_clause.test b/test/sql/create_pg/optional_edge_table_clause.test index c1693191..8c04f13f 100644 --- a/test/sql/create_pg/optional_edge_table_clause.test +++ b/test/sql/create_pg/optional_edge_table_clause.test @@ -8,6 +8,16 @@ import database 'duckdb-pgq/data/SNB0.003'; statement ok -CREATE PROPERTY GRAPH snb -VERTEX TABLES (Message); +VERTEX TABLES (Message, person); statement ok +-FROM GRAPH_TABLE (snb + MATCH (m:Message) + COLUMNS (*) + ) tmp + +statement error +-FROM GRAPH_TABLE (snb + MATCH (p:Person)-[k:Knows]->(p2:Person) + COLUMNS (*) + ) tmp \ No newline at end of file