diff --git a/.github/workflows/_extension_deploy.yml b/.github/workflows/_extension_deploy.yml index c09739e0..bdde85f4 100644 --- a/.github/workflows/_extension_deploy.yml +++ b/.github/workflows/_extension_deploy.yml @@ -92,7 +92,7 @@ jobs: cd duckdb git checkout ${{ inputs.duckdb_version }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}${{startsWith(matrix.duckdb, 'wasm') && '.wasm' || ''}} path: | diff --git a/duckdb b/duckdb index 2b8d5929..6236d0b5 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 2b8d5929fde8c7d742cb2889a535e3497e7f008f +Subproject commit 6236d0b555a3a6a400fcea2f024eaa245324dca1 diff --git a/extension-ci-tools b/extension-ci-tools index 83f847f8..46a8dd68 160000 --- a/extension-ci-tools +++ b/extension-ci-tools @@ -1 +1 @@ -Subproject commit 83f847f8467a760f6c66dc7996c13300210220a8 +Subproject commit 46a8dd6850b218b2c1a0ede5daf5053bdc225102 diff --git a/test/sql/path_finding/kleene_star.test b/test/sql/path_finding/kleene_star.test new file mode 100644 index 00000000..7cfc25d7 --- /dev/null +++ b/test/sql/path_finding/kleene_star.test @@ -0,0 +1,116 @@ +require duckpgq + +statement ok +CREATE TABLE nodes (id INTEGER); + +statement ok +CREATE TABLE edges (src INTEGER, dst INTEGER); + +statement ok +INSERT INTO nodes VALUES (1), (2), (3); + +statement ok +-CREATE PROPERTY GRAPH testgraph + VERTEX TABLES ( + nodes LABEL N + ) + EDGE TABLES ( + edges SOURCE KEY (src) REFERENCES nodes (id) + DESTINATION KEY (dst) REFERENCES nodes (id) + LABEL E +); + +query IIIII +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->*(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +1 1 [0] [] 0 +2 2 [1] [] 0 +3 3 [2] [] 0 + +query IIIII +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->+(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- + +query IIIII +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->{1,3}(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- + +query IIIII +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->{0,3}(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +1 1 [0] [] 0 +2 2 [1] [] 0 +3 3 [2] [] 0 + +query IIIII +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->{,3}(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +1 1 [0] [] 0 +2 2 [1] [] 0 +3 3 [2] [] 0 + + +statement error +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)*<-[e:E]->(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +Parser Error: PGQ expected an arrow instead of *< operator. at or near "*<" + +statement error +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)*-[e:E]->(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +Parser Error: syntax error at or near "*" + +statement error +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->{3,1}(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +Constraint Error: Lower bound greater than upper bound + +query IIIII +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->{,}(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +1 1 [0] [] 0 +2 2 [1] [] 0 +3 3 [2] [] 0 + +query IIIII +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->{1,1}(n2:N) + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- + +statement error +-FROM GRAPH_TABLE(testgraph + MATCH p = ANY SHORTEST (n1:N)-[e:E]->*(n2:N + COLUMNS (n1.id, n2.id, element_id(p), edges(p) AS path_edges, path_length(p)) +); +---- +Parser Error: syntax error at or near "COLUMNS" +