generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from cwida/issue/146-syntax-error-at-or-near
Allow kleene star without a space
- Loading branch information
Showing
4 changed files
with
119 additions
and
3 deletions.
There are no files selected for viewing
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
Submodule duckdb
updated
7 files
+7 −0 | README.md | |
+1 −1 | third_party/libpg_query/grammar/grammar.y | |
+332,850 −427,232 | third_party/libpg_query/grammar/grammar_out.output | |
+115 −82 | third_party/libpg_query/grammar/statements/pgq.y | |
+3 −5 | third_party/libpg_query/grammar/types/pgq.yh | |
+507 −505 | third_party/libpg_query/include/parser/gram.hpp | |
+21,466 −21,279 | third_party/libpg_query/src_backend_parser_gram.cpp |
Submodule extension-ci-tools
updated
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
|