diff --git a/duckdb b/duckdb index 5cd5dee9..592ee62c 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 5cd5dee9436886ba5a8c914ad5c40441fcd1da8b +Subproject commit 592ee62c397b20669beee0c9e76affb9bf92cffc diff --git a/src/core/utils/duckpgq_utils.cpp b/src/core/utils/duckpgq_utils.cpp index 8ac55889..2dae78ed 100644 --- a/src/core/utils/duckpgq_utils.cpp +++ b/src/core/utils/duckpgq_utils.cpp @@ -33,11 +33,11 @@ CreatePropertyGraphInfo* GetPropertyGraphInfo(const shared_ptr &du // Function to validate the source node and edge table shared_ptr ValidateSourceNodeAndEdgeTable(CreatePropertyGraphInfo *pg_info, const std::string &node_label, const std::string &edge_label) { - auto source_node_pg_entry = pg_info->GetTable(node_label, true, true); + auto source_node_pg_entry = pg_info->GetTableByLabel(node_label, true, true); if (!source_node_pg_entry->is_vertex_table) { throw Exception(ExceptionType::INVALID, node_label + " is an edge table, expected a vertex table"); } - auto edge_pg_entry = pg_info->GetTable(edge_label, true, false); + auto edge_pg_entry = pg_info->GetTableByLabel(edge_label, true, false); if (edge_pg_entry->is_vertex_table) { throw Exception(ExceptionType::INVALID, edge_label + " is a vertex table, expected an edge table"); } diff --git a/test/sql/create_pg/create_pg_with_pk_fk.test b/test/sql/create_pg/create_pg_with_pk_fk.test index 4e661689..e303098e 100644 --- a/test/sql/create_pg/create_pg_with_pk_fk.test +++ b/test/sql/create_pg/create_pg_with_pk_fk.test @@ -51,7 +51,7 @@ statement error vertex tables (v) edge tables (e2 source v destination w); ---- -Invalid Error: Referenced vertex table w is not registered in the vertex tables +Invalid Error: Table 'w' not found in the property graph g. statement ok -create property graph g diff --git a/test/sql/create_pg/create_property_graph.test b/test/sql/create_pg/create_property_graph.test index 5ffafc96..132a6bb4 100644 --- a/test/sql/create_pg/create_property_graph.test +++ b/test/sql/create_pg/create_property_graph.test @@ -147,8 +147,7 @@ EDGE TABLES ( PROPERTIES ( createDate ) LABEL Knows ) ---- -Invalid Error: Referenced vertex table Student is not registered in the vertex tables. - +Invalid Error: Table 'Student' not found in the property graph pg3. # Should fail since the edge table references vertex tables that do not exist statement error @@ -157,12 +156,12 @@ VERTEX TABLES ( School LABEL School IN School_kind (Hogeschool, University) ) EDGE TABLES ( - know SOURCE KEY ( src ) REFERENCES Student ( id ) + know SOURCE KEY ( src ) REFERENCES School ( school_id ) DESTINATION KEY ( dst ) REFERENCES Student__ ( id ) PROPERTIES ( createDate ) LABEL Knows ); ---- -Invalid Error: Referenced vertex table Student is not registered in the vertex tables. +Invalid Error: Table 'Student__' not found in the property graph pg3. # Check duplicate labels diff --git a/test/sql/path_finding/subpath_match.test b/test/sql/path_finding/subpath_match.test index 5f29b442..a6ceba89 100644 --- a/test/sql/path_finding/subpath_match.test +++ b/test/sql/path_finding/subpath_match.test @@ -43,16 +43,16 @@ FROM GRAPH_TABLE (pg ---- 0 Daniel -#query II -#-SELECT study.a_id, study.b_id -#FROM GRAPH_TABLE (pg -# MATCH -# (a:Person)-[k:Knows WHERE k.id = 10]->(b:Person) -# COLUMNS (a.id as a_id, b.id as b_id) -# ) study -#---- -#0 1 -# +query II +-SELECT study.a_id, study.b_id +FROM GRAPH_TABLE (pg + MATCH + (a:Person)-[k:Knows WHERE k.id = 10]->(b:Person) + COLUMNS (a.id as a_id, b.id as b_id) + ) study +---- +0 1 + #query II #WITH cte1 AS ( # SELECT CREATE_CSR_EDGE(