Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ OBJS = src/backend/age.o \
src/backend/parser/cypher_parse_node.o \
src/backend/parser/cypher_parser.o \
src/backend/parser/cypher_transform_entity.o \
src/backend/parser/cypher_label_expr.o \
src/backend/utils/adt/age_graphid_ds.o \
src/backend/utils/adt/agtype.o \
src/backend/utils/adt/agtype_ext.o \
Expand Down Expand Up @@ -112,6 +113,7 @@ REGRESS = scan \
jsonb_operators \
list_comprehension \
map_projection \
multiple_label \
drop

srcdir=`pwd`
Expand Down
96 changes: 48 additions & 48 deletions regress/expected/age_global_graph.out

Large diffs are not rendered by default.

330 changes: 165 additions & 165 deletions regress/expected/agtype.out

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions regress/expected/analyze.out
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NOTICE: graph "analyze" has been created
SELECT * FROM cypher('analyze', $$ CREATE (u) RETURN u $$) AS (result agtype);
result
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(1 row)

-- should error due to invalid input to cypher function
Expand Down Expand Up @@ -100,7 +100,7 @@ SELECT * FROM age_prepare_cypher('analyze', 'MATCH (u) RETURN (u)');
SELECT * FROM cypher(NULL, NULL) AS (result agtype);
result
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(1 row)

-- should error due to invalid input to cypher function
Expand Down
16 changes: 8 additions & 8 deletions regress/expected/cypher_call.out
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ HINT: Name explicitly using `YIELD` instead
SELECT * FROM cypher('cypher_call', $$ MATCH (a) CALL sqrt(64) YIELD sqrt RETURN a, sqrt $$) as (a agtype, sqrt agtype);
a | sqrt
------------------------------------------------------------------------+------
{"id": 281474976710657, "label": "", "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": "", "properties": {"n": "b"}}::vertex | 8.0
{"id": 281474976710657, "label": [], "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": [], "properties": {"n": "b"}}::vertex | 8.0
(2 rows)

/* MATCH CALL YIELD WHERE UPDATE/RETURN */
Expand All @@ -163,8 +163,8 @@ SELECT * FROM cypher('cypher_call', $$ MATCH (a) CALL sqrt(64) YIELD sqrt WHERE
SELECT * FROM cypher('cypher_call', $$ MATCH (a) CALL sqrt(64) YIELD sqrt WHERE sqrt = 8 RETURN a, sqrt $$) as (a agtype, sqrt agtype);
a | sqrt
------------------------------------------------------------------------+------
{"id": 281474976710657, "label": "", "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": "", "properties": {"n": "b"}}::vertex | 8.0
{"id": 281474976710657, "label": [], "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": [], "properties": {"n": "b"}}::vertex | 8.0
(2 rows)

SELECT * FROM cypher('cypher_call', $$ MATCH (a) CALL sqrt(64) YIELD sqrt WHERE b = 8 RETURN a, sqrt $$) as (a agtype, sqrt agtype);
Expand Down Expand Up @@ -195,15 +195,15 @@ SELECT * FROM cypher('cypher_call', $$ CALL sqrt(64) YIELD sqrt MATCH (a) WHERE
SELECT * FROM cypher('cypher_call', $$ CALL sqrt(64) YIELD sqrt MATCH (a) WHERE sqrt = 8 RETURN a, sqrt $$) as (a agtype, sqrt agtype);
a | sqrt
------------------------------------------------------------------------+------
{"id": 281474976710657, "label": "", "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": "", "properties": {"n": "b"}}::vertex | 8.0
{"id": 281474976710657, "label": [], "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": [], "properties": {"n": "b"}}::vertex | 8.0
(2 rows)

SELECT * FROM cypher('cypher_call', $$ CALL sqrt(64) YIELD sqrt WHERE sqrt = 8 MATCH (a) RETURN a, sqrt $$) as (a agtype, sqrt agtype);
a | sqrt
------------------------------------------------------------------------+------
{"id": 281474976710657, "label": "", "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": "", "properties": {"n": "b"}}::vertex | 8.0
{"id": 281474976710657, "label": [], "properties": {"n": "a"}}::vertex | 8.0
{"id": 281474976710658, "label": [], "properties": {"n": "b"}}::vertex | 8.0
(2 rows)

/* Multiple Calls: CALL YIELD CALL YIELD... RETURN */
Expand Down
260 changes: 130 additions & 130 deletions regress/expected/cypher_create.out

Large diffs are not rendered by default.

256 changes: 128 additions & 128 deletions regress/expected/cypher_delete.out

Large diffs are not rendered by default.

1,012 changes: 506 additions & 506 deletions regress/expected/cypher_match.out

Large diffs are not rendered by default.

548 changes: 274 additions & 274 deletions regress/expected/cypher_merge.out

Large diffs are not rendered by default.

424 changes: 212 additions & 212 deletions regress/expected/cypher_remove.out

Large diffs are not rendered by default.

818 changes: 409 additions & 409 deletions regress/expected/cypher_set.out

Large diffs are not rendered by default.

228 changes: 114 additions & 114 deletions regress/expected/cypher_subquery.out

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions regress/expected/cypher_union.out
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ SELECT * FROM cypher('cypher_union', $$CREATE ()$$) as (a agtype);
SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION MATCH (n) RETURN n$$) as (a agtype);
a
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(1 row)

SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION ALL MATCH (n) RETURN n$$) as (a agtype);
a
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(2 rows)

SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION RETURN 1$$) as (a agtype);
a
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
1
(2 rows)

SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION RETURN NULL$$) as (a agtype);
a
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex

(2 rows)

Expand Down Expand Up @@ -85,31 +85,31 @@ SELECT * FROM cypher('cypher_union', $$RETURN NULL UNION ALL RETURN NULL$$) AS (
SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION MATCH (n) RETURN n UNION MATCH (n) RETURN n$$) AS (result agtype);
result
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(1 row)

/*should return triple*/
SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION ALL MATCH (n) RETURN n UNION ALL MATCH(n) RETURN n$$) AS (result agtype);
result
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(3 rows)

/*should return single*/
SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION ALL MATCH (n) RETURN n UNION MATCH(n) RETURN n$$) AS (result agtype);
result
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(1 row)

/*should return just a pair*/
SELECT * FROM cypher('cypher_union', $$MATCH (n) RETURN n UNION MATCH (n) RETURN n UNION ALL MATCH(n) RETURN n$$) AS (result agtype);
result
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": "", "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
{"id": 281474976710657, "label": [], "properties": {}}::vertex
(2 rows)

/*should return 3 null rows*/
Expand Down
26 changes: 13 additions & 13 deletions regress/expected/cypher_unwind.out
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ SELECT * FROM cypher('cypher_unwind', $$
$$) as (i agtype);
i
-----------------------------------------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {"a": [1, 2, 3], "name": "node1"}}::vertex
{"id": 281474976710658, "label": "", "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex
{"id": 281474976710659, "label": "", "properties": {"a": [7, 8, 9], "name": "node3"}}::vertex
{"id": 281474976710657, "label": [], "properties": {"a": [1, 2, 3], "name": "node1"}}::vertex
{"id": 281474976710658, "label": [], "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex
{"id": 281474976710659, "label": [], "properties": {"a": [7, 8, 9], "name": "node3"}}::vertex
(3 rows)

--
Expand Down Expand Up @@ -104,10 +104,10 @@ SELECT * FROM cypher('cypher_unwind', $$
$$) as (i agtype);
i
-----------------------------------------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {"a": [1, 2, 3], "name": "node1"}}::vertex
{"id": 281474976710658, "label": "", "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex
{"id": 281474976710658, "label": "", "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex
{"id": 281474976710659, "label": "", "properties": {"a": [7, 8, 9], "name": "node3"}}::vertex
{"id": 281474976710657, "label": [], "properties": {"a": [1, 2, 3], "name": "node1"}}::vertex
{"id": 281474976710658, "label": [], "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex
{"id": 281474976710658, "label": [], "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex
{"id": 281474976710659, "label": [], "properties": {"a": [7, 8, 9], "name": "node3"}}::vertex
(4 rows)

SELECT * FROM cypher('cypher_unwind', $$
Expand Down Expand Up @@ -152,9 +152,9 @@ SELECT * FROM cypher('cypher_unwind', $$
UNWIND [p] as path
RETURN path
$$) as (i agtype);
i
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[{"id": 281474976710657, "label": "_ag_label_vertex", "properties": {"a": [1, 2, 3], "name": "node1"}}::vertex, {"id": 844424930131969, "label": "KNOWS", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}::edge, {"id": 281474976710658, "label": "_ag_label_vertex", "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex, {"id": 844424930131970, "label": "KNOWS", "end_id": 281474976710659, "start_id": 281474976710658, "properties": {}}::edge, {"id": 281474976710659, "label": "_ag_label_vertex", "properties": {"a": [7, 8, 9], "name": "node3"}}::vertex]::path
i
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[{"id": 281474976710657, "label": [], "properties": {"a": [1, 2, 3], "name": "node1"}}::vertex, {"id": 844424930131969, "label": "KNOWS", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}::edge, {"id": 281474976710658, "label": [], "properties": {"a": [4, 5, 6], "name": "node2"}}::vertex, {"id": 844424930131970, "label": "KNOWS", "end_id": 281474976710659, "start_id": 281474976710658, "properties": {}}::edge, {"id": 281474976710659, "label": [], "properties": {"a": [7, 8, 9], "name": "node3"}}::vertex]::path
(1 row)

SELECT * FROM cypher('cypher_unwind', $$
Expand Down Expand Up @@ -195,9 +195,9 @@ SELECT * FROM cypher('cypher_unwind', $$
$$) as (i agtype);
i
-----------------------------------------------------------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {"a": [1, 2, 3], "name": "node1", "type": "vertex"}}::vertex
{"id": 281474976710658, "label": "", "properties": {"a": [4, 5, 6], "name": "node2", "type": "vertex"}}::vertex
{"id": 281474976710659, "label": "", "properties": {"a": [7, 8, 9], "name": "node3", "type": "vertex"}}::vertex
{"id": 281474976710657, "label": [], "properties": {"a": [1, 2, 3], "name": "node1", "type": "vertex"}}::vertex
{"id": 281474976710658, "label": [], "properties": {"a": [4, 5, 6], "name": "node2", "type": "vertex"}}::vertex
{"id": 281474976710659, "label": [], "properties": {"a": [7, 8, 9], "name": "node3", "type": "vertex"}}::vertex
(3 rows)

--
Expand Down
Loading