From 23ce51147e6f4c256ceead00027cf7f2f92d983e Mon Sep 17 00:00:00 2001 From: Rafsun Masud Date: Mon, 26 Aug 2024 14:02:21 -0700 Subject: [PATCH] Update after rebase * Regression tests * Comments * Minor overlook during rebasing --- regress/expected/age_load.out | 6 +- regress/expected/cypher.out | 30 +++--- regress/expected/cypher_match.out | 2 +- regress/expected/cypher_merge.out | 12 +-- regress/expected/cypher_subquery.out | 114 +++++++++++--------- regress/expected/expr.out | 136 ++++++++++++------------ regress/expected/list_comprehension.out | 4 +- src/backend/commands/label_commands.c | 3 + src/backend/parser/cypher_label_expr.c | 19 ++++ src/backend/utils/adt/agtype.c | 2 +- src/backend/utils/load/age_load.c | 3 +- 11 files changed, 182 insertions(+), 149 deletions(-) diff --git a/regress/expected/age_load.out b/regress/expected/age_load.out index b638e636b..83134aff2 100644 --- a/regress/expected/age_load.out +++ b/regress/expected/age_load.out @@ -28,9 +28,9 @@ NOTICE: graph "agload_test_graph" has been created (1 row) SELECT * FROM cypher('agload_test_graph', $$CREATE (n:Country {__id__:1}) RETURN n$$) as (n agtype); - n ----------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Country", "properties": {"__id__": 1}}::vertex + n +------------------------------------------------------------------------------------ + {"id": 844424930131969, "label": ["Country"], "properties": {"__id__": 1}}::vertex (1 row) -- diff --git a/regress/expected/cypher.out b/regress/expected/cypher.out index 31bafc6cf..af54f503c 100644 --- a/regress/expected/cypher.out +++ b/regress/expected/cypher.out @@ -173,16 +173,16 @@ CREATE TABLE my_detailed_paths AS SELECT * FROM my_vertices; u ---------------------------------------------------------------- - {"id": 281474976710657, "label": "", "properties": {}}::vertex - {"id": 281474976710658, "label": "", "properties": {}}::vertex - {"id": 281474976710659, "label": "", "properties": {}}::vertex - {"id": 281474976710660, "label": "", "properties": {}}::vertex - {"id": 281474976710661, "label": "", "properties": {}}::vertex - {"id": 281474976710662, "label": "", "properties": {}}::vertex - {"id": 281474976710663, "label": "", "properties": {}}::vertex - {"id": 281474976710664, "label": "", "properties": {}}::vertex - {"id": 281474976710665, "label": "", "properties": {}}::vertex - {"id": 281474976710666, "label": "", "properties": {}}::vertex + {"id": 281474976710657, "label": [], "properties": {}}::vertex + {"id": 281474976710658, "label": [], "properties": {}}::vertex + {"id": 281474976710659, "label": [], "properties": {}}::vertex + {"id": 281474976710660, "label": [], "properties": {}}::vertex + {"id": 281474976710661, "label": [], "properties": {}}::vertex + {"id": 281474976710662, "label": [], "properties": {}}::vertex + {"id": 281474976710663, "label": [], "properties": {}}::vertex + {"id": 281474976710664, "label": [], "properties": {}}::vertex + {"id": 281474976710665, "label": [], "properties": {}}::vertex + {"id": 281474976710666, "label": [], "properties": {}}::vertex (10 rows) SELECT * FROM my_edges; @@ -198,11 +198,11 @@ SELECT * FROM my_edges; SELECT * FROM my_detailed_paths; u | e | v | p ----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710657, "label": "", "properties": {}}::vertex | {"id": 844424930131969, "label": "knows", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}::edge | {"id": 281474976710658, "label": "", "properties": {}}::vertex | [{"id": 281474976710657, "label": "", "properties": {}}::vertex, {"id": 844424930131969, "label": "knows", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}::edge, {"id": 281474976710658, "label": "", "properties": {}}::vertex]::path - {"id": 281474976710659, "label": "", "properties": {}}::vertex | {"id": 844424930131970, "label": "knows", "end_id": 281474976710660, "start_id": 281474976710659, "properties": {}}::edge | {"id": 281474976710660, "label": "", "properties": {}}::vertex | [{"id": 281474976710659, "label": "", "properties": {}}::vertex, {"id": 844424930131970, "label": "knows", "end_id": 281474976710660, "start_id": 281474976710659, "properties": {}}::edge, {"id": 281474976710660, "label": "", "properties": {}}::vertex]::path - {"id": 281474976710661, "label": "", "properties": {}}::vertex | {"id": 844424930131971, "label": "knows", "end_id": 281474976710662, "start_id": 281474976710661, "properties": {}}::edge | {"id": 281474976710662, "label": "", "properties": {}}::vertex | [{"id": 281474976710661, "label": "", "properties": {}}::vertex, {"id": 844424930131971, "label": "knows", "end_id": 281474976710662, "start_id": 281474976710661, "properties": {}}::edge, {"id": 281474976710662, "label": "", "properties": {}}::vertex]::path - {"id": 281474976710663, "label": "", "properties": {}}::vertex | {"id": 844424930131972, "label": "knows", "end_id": 281474976710664, "start_id": 281474976710663, "properties": {}}::edge | {"id": 281474976710664, "label": "", "properties": {}}::vertex | [{"id": 281474976710663, "label": "", "properties": {}}::vertex, {"id": 844424930131972, "label": "knows", "end_id": 281474976710664, "start_id": 281474976710663, "properties": {}}::edge, {"id": 281474976710664, "label": "", "properties": {}}::vertex]::path - {"id": 281474976710665, "label": "", "properties": {}}::vertex | {"id": 844424930131973, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710665, "properties": {}}::edge | {"id": 281474976710666, "label": "", "properties": {}}::vertex | [{"id": 281474976710665, "label": "", "properties": {}}::vertex, {"id": 844424930131973, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710665, "properties": {}}::edge, {"id": 281474976710666, "label": "", "properties": {}}::vertex]::path + {"id": 281474976710657, "label": [], "properties": {}}::vertex | {"id": 844424930131969, "label": "knows", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}::edge | {"id": 281474976710658, "label": [], "properties": {}}::vertex | [{"id": 281474976710657, "label": [], "properties": {}}::vertex, {"id": 844424930131969, "label": "knows", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}::edge, {"id": 281474976710658, "label": [], "properties": {}}::vertex]::path + {"id": 281474976710659, "label": [], "properties": {}}::vertex | {"id": 844424930131970, "label": "knows", "end_id": 281474976710660, "start_id": 281474976710659, "properties": {}}::edge | {"id": 281474976710660, "label": [], "properties": {}}::vertex | [{"id": 281474976710659, "label": [], "properties": {}}::vertex, {"id": 844424930131970, "label": "knows", "end_id": 281474976710660, "start_id": 281474976710659, "properties": {}}::edge, {"id": 281474976710660, "label": [], "properties": {}}::vertex]::path + {"id": 281474976710661, "label": [], "properties": {}}::vertex | {"id": 844424930131971, "label": "knows", "end_id": 281474976710662, "start_id": 281474976710661, "properties": {}}::edge | {"id": 281474976710662, "label": [], "properties": {}}::vertex | [{"id": 281474976710661, "label": [], "properties": {}}::vertex, {"id": 844424930131971, "label": "knows", "end_id": 281474976710662, "start_id": 281474976710661, "properties": {}}::edge, {"id": 281474976710662, "label": [], "properties": {}}::vertex]::path + {"id": 281474976710663, "label": [], "properties": {}}::vertex | {"id": 844424930131972, "label": "knows", "end_id": 281474976710664, "start_id": 281474976710663, "properties": {}}::edge | {"id": 281474976710664, "label": [], "properties": {}}::vertex | [{"id": 281474976710663, "label": [], "properties": {}}::vertex, {"id": 844424930131972, "label": "knows", "end_id": 281474976710664, "start_id": 281474976710663, "properties": {}}::edge, {"id": 281474976710664, "label": [], "properties": {}}::vertex]::path + {"id": 281474976710665, "label": [], "properties": {}}::vertex | {"id": 844424930131973, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710665, "properties": {}}::edge | {"id": 281474976710666, "label": [], "properties": {}}::vertex | [{"id": 281474976710665, "label": [], "properties": {}}::vertex, {"id": 844424930131973, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710665, "properties": {}}::edge, {"id": 281474976710666, "label": [], "properties": {}}::vertex]::path (5 rows) -- cleanup diff --git a/regress/expected/cypher_match.out b/regress/expected/cypher_match.out index 577d2527b..68f0ab271 100644 --- a/regress/expected/cypher_match.out +++ b/regress/expected/cypher_match.out @@ -1556,7 +1556,7 @@ $$) AS (i agtype); SELECT * FROM cypher('cypher_match', $$ MATCH p=(:duplicate)-[]-(:other_v) RETURN DISTINCT p -$$) AS (i agtype); +$$) AS (i agtype) ORDER BY i; i ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [{"id": 3377699720527873, "label": ["duplicate"], "properties": {}}::vertex, {"id": 3659174697238529, "label": "dup_edge", "end_id": 3940649673949185, "start_id": 3377699720527873, "properties": {"id": 1}}::edge, {"id": 3940649673949185, "label": ["other_v"], "properties": {}}::vertex]::path diff --git a/regress/expected/cypher_merge.out b/regress/expected/cypher_merge.out index b64860135..aa6476300 100644 --- a/regress/expected/cypher_merge.out +++ b/regress/expected/cypher_merge.out @@ -1662,16 +1662,16 @@ NOTICE: graph "issue_1907" has been created SELECT * from cypher('issue_1907', $$ CREATE (n:Testnode {name: 'Test Node A'}) RETURN n $$) as (n agtype); - n ---------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Testnode", "properties": {"name": "Test Node A"}}::vertex + n +----------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Testnode"], "properties": {"name": "Test Node A"}}::vertex (1 row) SELECT * from cypher('issue_1907', $$ CREATE (n:Testnode {name: 'Test Node B'}) RETURN n $$) as (n agtype); - n ---------------------------------------------------------------------------------------------- - {"id": 844424930131970, "label": "Testnode", "properties": {"name": "Test Node B"}}::vertex + n +----------------------------------------------------------------------------------------------- + {"id": 844424930131970, "label": ["Testnode"], "properties": {"name": "Test Node B"}}::vertex (1 row) SELECT * FROM cypher('issue_1907', $$ MATCH ()-[r]->() RETURN r $$) AS (r agtype); diff --git a/regress/expected/cypher_subquery.out b/regress/expected/cypher_subquery.out index 6741f1be3..aa661c230 100644 --- a/regress/expected/cypher_subquery.out +++ b/regress/expected/cypher_subquery.out @@ -29,13 +29,14 @@ SELECT * FROM cypher('subquery', $$ MATCH (a) RETURN (a) $$) AS (result agtype); {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex {"id": 844424930131974, "label": ["person"], "properties": {"age": 33, "name": "Valerie"}}::vertex {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Lucy"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex {"id": 1688849860263937, "label": ["pet"], "properties": {"name": "Hobbes"}}::vertex {"id": 1688849860263938, "label": ["pet"], "properties": {"name": "Snoopy"}}::vertex {"id": 1688849860263939, "label": ["pet"], "properties": {"name": "Odie"}}::vertex {"id": 1688849860263940, "label": ["pet"], "properties": {"name": "Garfield"}}::vertex -(13 rows) +(14 rows) SELECT * FROM cypher('subquery', $$ MATCH (a:person) WHERE EXISTS {(a:person)-[]->(:pet)} @@ -43,8 +44,8 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) result --------------------------------------------------------------------------------------------------- {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex (3 rows) --trying to use b when not defined, should create pattern @@ -54,8 +55,8 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) result --------------------------------------------------------------------------------------------------- {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex (3 rows) --query inside @@ -65,8 +66,8 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) result --------------------------------------------------------------------------------------------------- {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex (3 rows) --repeat variable in match @@ -143,12 +144,12 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) MATCH (a:person)-[]->(c:person) } RETURN (a) $$) AS (result agtype); - result ---------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "person", "properties": {"age": 32, "name": "Briggite"}}::vertex - {"id": 844424930131972, "label": "person", "properties": {"age": 25, "name": "Faye"}}::vertex - {"id": 844424930131973, "label": "person", "properties": {"age": 34, "name": "Tony"}}::vertex - {"id": 844424930131977, "label": "person", "properties": {"age": 8, "name": "Charlie"}}::vertex + result +----------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["person"], "properties": {"age": 32, "name": "Briggite"}}::vertex + {"id": 844424930131972, "label": ["person"], "properties": {"age": 25, "name": "Faye"}}::vertex + {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex (4 rows) --union, mismatched number of return columns for returns @@ -198,9 +199,10 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex {"id": 844424930131974, "label": ["person"], "properties": {"age": 33, "name": "Valerie"}}::vertex {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex -(9 rows) + {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Lucy"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex +(10 rows) --nesting same var multiple layers SELECT * FROM cypher('subquery', $$ MATCH (a:person) @@ -236,13 +238,14 @@ SELECT * FROM cypher('subquery', $$ MATCH (a) {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex {"id": 844424930131974, "label": ["person"], "properties": {"age": 33, "name": "Valerie"}}::vertex {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Lucy"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex {"id": 1688849860263937, "label": ["pet"], "properties": {"name": "Hobbes"}}::vertex {"id": 1688849860263938, "label": ["pet"], "properties": {"name": "Snoopy"}}::vertex {"id": 1688849860263939, "label": ["pet"], "properties": {"name": "Odie"}}::vertex {"id": 1688849860263940, "label": ["pet"], "properties": {"name": "Garfield"}}::vertex -(13 rows) +(14 rows) --nesting, accessing indirection in outer scope SELECT * FROM cypher('subquery', $$ MATCH (a:person) @@ -264,9 +267,10 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex {"id": 844424930131974, "label": ["person"], "properties": {"age": 33, "name": "Valerie"}}::vertex {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex -(9 rows) + {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Lucy"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex +(10 rows) --nesting, accessing var 2+ levels up SELECT * FROM cypher('subquery', $$ MATCH (a:person) @@ -304,9 +308,10 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex {"id": 844424930131974, "label": ["person"], "properties": {"age": 33, "name": "Valerie"}}::vertex {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex -(9 rows) + {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Lucy"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex +(10 rows) --EXISTS outside of WHERE SELECT * FROM cypher('subquery', $$ MATCH (a:person) @@ -321,9 +326,10 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex | false {"id": 844424930131974, "label": ["person"], "properties": {"age": 33, "name": "Valerie"}}::vertex | false {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex | true - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex | true - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex | true -(9 rows) + {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Lucy"}}::vertex | false + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex | true + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex | true +(10 rows) --Var doesnt exist in outside scope, should fail SELECT * FROM cypher('subquery', $$ RETURN 1, @@ -384,12 +390,13 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) SELECT * FROM cypher('subquery', $$ MATCH (a:person) WHERE COUNT{MATCH (a:person)-[]-()} > 1 RETURN a $$) AS (result agtype); - result -------------------------------------------------------------------------------------------------- + result +--------------------------------------------------------------------------------------------------- {"id": 844424930131972, "label": ["person"], "properties": {"age": 25, "name": "Faye"}}::vertex {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex -(3 rows) + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex +(4 rows) --match where person has more than one pet SELECT * FROM cypher('subquery', $$ MATCH (a:person) @@ -397,25 +404,26 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) RETURN a $$) AS (result agtype); result ------------------------------------------------------------------------------------------------ - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex (1 row) --match on labels SELECT * FROM cypher('subquery', $$ MATCH (a:person) WHERE COUNT{MATCH (a:person)-[:knows]-()} > 1 RETURN a $$) AS (result agtype); - result -------------------------------------------------------------------------------------------------- + result +--------------------------------------------------------------------------------------------------- {"id": 844424930131972, "label": ["person"], "properties": {"age": 25, "name": "Faye"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex -(2 rows) + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex +(3 rows) SELECT * FROM cypher('subquery', $$ MATCH (a:person) WHERE COUNT{MATCH (a:person)-[:knows]-(:pet)} > 1 RETURN a $$) AS (result agtype); result ------------------------------------------------------------------------------------------------ - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex (1 row) SELECT * FROM cypher('subquery', $$ MATCH (a:person) @@ -585,8 +593,8 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) {"id": 844424930131972, "label": ["person"], "properties": {"age": 25, "name": "Faye"}}::vertex {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex (6 rows) -- Nested BoolExpr @@ -595,9 +603,9 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person) WHERE a.name = 'Charlie'} AND EXISTS {(a:person)-[]->(:person)} RETURN (a) $$) AS (result agtype); - result -------------------------------------------------------------------------------------------------- - {"id": 844424930131977, "label": "person", "properties": {"age": 8, "name": "Charlie"}}::vertex + result +--------------------------------------------------------------------------------------------------- + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex (1 row) -- CaseExpr @@ -635,8 +643,8 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person)-[]->(b) result ------------------------------------------------------------------------------------------------- {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex (3 rows) -- nested in another exists @@ -661,8 +669,9 @@ SELECT * FROM cypher('subquery', $$ MATCH (a:person)-[]->(b) result --------------------------------------------------------------------------------------------------- {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex -(2 rows) + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex +(3 rows) --coalesce, nested in return SELECT * FROM cypher('subquery', $$ MATCH (a:person)-[]->(b) @@ -702,13 +711,14 @@ SELECT * FROM cypher('subquery', $$MATCH (a) {"id": 844424930131973, "label": ["person"], "properties": {"age": 34, "name": "Tony"}}::vertex | false {"id": 844424930131974, "label": ["person"], "properties": {"age": 33, "name": "Valerie"}}::vertex | false {"id": 844424930131975, "label": ["person"], "properties": {"age": 6, "name": "Calvin"}}::vertex | false - {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex | false - {"id": 844424930131977, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex | false + {"id": 844424930131976, "label": ["person"], "properties": {"age": 8, "name": "Lucy"}}::vertex | false + {"id": 844424930131977, "label": ["person"], "properties": {"age": 8, "name": "Charlie"}}::vertex | false + {"id": 844424930131978, "label": ["person"], "properties": {"age": 29, "name": "Jon"}}::vertex | false {"id": 1688849860263937, "label": ["pet"], "properties": {"name": "Hobbes"}}::vertex | true {"id": 1688849860263938, "label": ["pet"], "properties": {"name": "Snoopy"}}::vertex | true {"id": 1688849860263939, "label": ["pet"], "properties": {"name": "Odie"}}::vertex | true {"id": 1688849860263940, "label": ["pet"], "properties": {"name": "Garfield"}}::vertex | true -(13 rows) +(14 rows) -- map projection --where diff --git a/regress/expected/expr.out b/regress/expected/expr.out index ee46c77a8..ce77f5056 100644 --- a/regress/expected/expr.out +++ b/regress/expected/expr.out @@ -2511,8 +2511,8 @@ SELECT cast(null::agtype as json); SELECT vertex_in_json, vertex_in_json->'id' as id, pg_typeof(vertex_in_json) FROM cypher('type_coercion', $$ MATCH (a) RETURN a $$) AS (vertex_in_json json); vertex_in_json | id | pg_typeof --------------------------------------------------------+-----------------+----------- - {"id": 281474976710657, "label": "", "properties": {}} | 281474976710657 | json - {"id": 281474976710658, "label": "", "properties": {}} | 281474976710658 | json + {"id": 281474976710657, "label": [], "properties": {}} | 281474976710657 | json + {"id": 281474976710658, "label": [], "properties": {}} | 281474976710658 | json (2 rows) SELECT edge_in_json, edge_in_json->'id' as id, pg_typeof(edge_in_json) FROM cypher('type_coercion', $$ MATCH ()-[e]->() RETURN e $$) AS (edge_in_json json); @@ -2537,13 +2537,13 @@ SELECT *, pg_typeof(props_in_json) FROM cypher('type_coercion', $$ MATCH (a) RET SELECT path_in_json, path_in_json->0 as first_node FROM cypher('type_coercion', $$ MATCH p=()-[]->() RETURN p $$) AS (path_in_json json); path_in_json | first_node --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------- - [{"id": 281474976710657, "label": "", "properties": {}}, {"id": 844424930131969, "label": "edge", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}, {"id": 281474976710658, "label": "", "properties": {}}] | {"id": 281474976710657, "label": "", "properties": {}} + [{"id": 281474976710657, "label": [], "properties": {}}, {"id": 844424930131969, "label": "edge", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}, {"id": 281474976710658, "label": [], "properties": {}}] | {"id": 281474976710657, "label": [], "properties": {}} (1 row) SELECT *, pg_typeof(nodes_in_json) FROM cypher('type_coercion', $$ MATCH p=()-[]->() RETURN nodes(p) $$) AS (nodes_in_json json); nodes_in_json | pg_typeof ------------------------------------------------------------------------------------------------------------------+----------- - [{"id": 281474976710657, "label": "", "properties": {}}, {"id": 281474976710658, "label": "", "properties": {}}] | json + [{"id": 281474976710657, "label": [], "properties": {}}, {"id": 281474976710658, "label": [], "properties": {}}] | json (1 row) SELECT *, pg_typeof(rels_in_json) FROM cypher('type_coercion', $$ MATCH p=()-[]->() RETURN relationships(p) $$) AS (rels_in_json json); @@ -2555,8 +2555,8 @@ SELECT *, pg_typeof(rels_in_json) FROM cypher('type_coercion', $$ MATCH p=()-[]- SELECT cast(result as json) FROM cypher('type_coercion', $$ MATCH (a) RETURN a $$) AS (result agtype); result -------------------------------------------------------- - {"id": 281474976710657, "label": "", "properties": {}} - {"id": 281474976710658, "label": "", "properties": {}} + {"id": 281474976710657, "label": [], "properties": {}} + {"id": 281474976710658, "label": [], "properties": {}} (2 rows) SELECT cast(result as json) FROM cypher('type_coercion', $$ MATCH ()-[e]-() RETURN e $$) AS (result agtype); @@ -2575,7 +2575,7 @@ SELECT cast(result as json) FROM cypher('type_coercion', $$ MATCH ()-[e *]->() R SELECT cast(result as json) FROM cypher('type_coercion', $$ MATCH p=()-[]->() RETURN p $$) AS (result agtype); result -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - [{"id": 281474976710657, "label": "", "properties": {}}, {"id": 844424930131969, "label": "edge", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}, {"id": 281474976710658, "label": "", "properties": {}}] + [{"id": 281474976710657, "label": [], "properties": {}}, {"id": 844424930131969, "label": "edge", "end_id": 281474976710658, "start_id": 281474976710657, "properties": {}}, {"id": 281474976710658, "label": [], "properties": {}}] (1 row) SELECT pg_typeof(cast(result as json)) FROM cypher('type_coercion', $$ MATCH p=()-[]->() RETURN p $$) AS (result agtype); @@ -8537,62 +8537,62 @@ NOTICE: graph "expanded_map" has been created SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48} ) RETURN u $$) as (result agtype); result ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710657, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48}}::vertex + {"id": 281474976710657, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48, n49: 49} ) RETURN u $$) as (result agtype); result ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710658, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49}}::vertex + {"id": 281474976710658, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48, n49: 49, n50: 50} ) RETURN u $$) as (result agtype); result --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710659, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50}}::vertex + {"id": 281474976710659, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48, n49: 49, n50: 50, n51: 51} ) RETURN u $$) as (result agtype); result -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710660, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51}}::vertex + {"id": 281474976710660, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48, n49: 49, n50: 50, n51: 51, n52: 52, n53: 53, n54: 54, n55: 55, n56: 56, n57: 57, n58: 58, n59: 59, n60: 60, n61: 61, n62: 62, n63: 63, n64: 64, n65: 65, n66: 66, n67: 67, n68: 68, n69: 69, n70: 70, n71: 71, n72: 72, n73: 73, n74: 74, n75: 75, n76: 76, n77: 77, n78: 78, n79: 79, n80: 80, n81: 81, n82: 82, n83: 83, n84: 84, n85: 85, n86: 86, n87: 87, n88: 88, n89: 89, n90: 90, n91: 91, n92: 92, n93: 93, n94: 94, n95: 95, n96: 96, n97: 97, n98: 98} ) RETURN u $$) as (result agtype); result --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710661, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98}}::vertex + {"id": 281474976710661, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48, n49: 49, n50: 50, n51: 51, n52: 52, n53: 53, n54: 54, n55: 55, n56: 56, n57: 57, n58: 58, n59: 59, n60: 60, n61: 61, n62: 62, n63: 63, n64: 64, n65: 65, n66: 66, n67: 67, n68: 68, n69: 69, n70: 70, n71: 71, n72: 72, n73: 73, n74: 74, n75: 75, n76: 76, n77: 77, n78: 78, n79: 79, n80: 80, n81: 81, n82: 82, n83: 83, n84: 84, n85: 85, n86: 86, n87: 87, n88: 88, n89: 89, n90: 90, n91: 91, n92: 92, n93: 93, n94: 94, n95: 95, n96: 96, n97: 97, n98: 98, n99: 99} ) RETURN u $$) as (result agtype); result -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710662, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99}}::vertex + {"id": 281474976710662, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48, n49: 49, n50: 50, n51: 51, n52: 52, n53: 53, n54: 54, n55: 55, n56: 56, n57: 57, n58: 58, n59: 59, n60: 60, n61: 61, n62: 62, n63: 63, n64: 64, n65: 65, n66: 66, n67: 67, n68: 68, n69: 69, n70: 70, n71: 71, n72: 72, n73: 73, n74: 74, n75: 75, n76: 76, n77: 77, n78: 78, n79: 79, n80: 80, n81: 81, n82: 82, n83: 83, n84: 84, n85: 85, n86: 86, n87: 87, n88: 88, n89: 89, n90: 90, n91: 91, n92: 92, n93: 93, n94: 94, n95: 95, n96: 96, n97: 97, n98: 98, n99: 99, n100: 100} ) RETURN u $$) as (result agtype); result --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710663, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100}}::vertex + {"id": 281474976710663, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ CREATE (u {n0: 0, n1: 1, n2: 2, n3: 3, n4: 4, n5: 5, n6: 6, n7: 7, n8: 8, n9: 9, n10: 10, n11: 11, n12: 12, n13: 13, n14: 14, n15: 15, n16: 16, n17: 17, n18: 18, n19: 19, n20: 20, n21: 21, n22: 22, n23: 23, n24: 24, n25: 25, n26: 26, n27: 27, n28: 28, n29: 29, n30: 30, n31: 31, n32: 32, n33: 33, n34: 34, n35: 35, n36: 36, n37: 37, n38: 38, n39: 39, n40: 40, n41: 41, n42: 42, n43: 43, n44: 44, n45: 45, n46: 46, n47: 47, n48: 48, n49: 49, n50: 50, n51: 51, n52: 52, n53: 53, n54: 54, n55: 55, n56: 56, n57: 57, n58: 58, n59: 59, n60: 60, n61: 61, n62: 62, n63: 63, n64: 64, n65: 65, n66: 66, n67: 67, n68: 68, n69: 69, n70: 70, n71: 71, n72: 72, n73: 73, n74: 74, n75: 75, n76: 76, n77: 77, n78: 78, n79: 79, n80: 80, n81: 81, n82: 82, n83: 83, n84: 84, n85: 85, n86: 86, n87: 87, n88: 88, n89: 89, n90: 90, n91: 91, n92: 92, n93: 93, n94: 94, n95: 95, n96: 96, n97: 97, n98: 98, n99: 99, n100: 100, n101: 101} ) RETURN u $$) as (result agtype); result ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710664, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100, "n101": 101}}::vertex + {"id": 281474976710664, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100, "n101": 101}}::vertex (1 row) SELECT * FROM cypher('expanded_map', $$ MATCH (u) RETURN u $$) as (result agtype); result ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710657, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48}}::vertex - {"id": 281474976710658, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49}}::vertex - {"id": 281474976710659, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50}}::vertex - {"id": 281474976710660, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51}}::vertex - {"id": 281474976710661, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98}}::vertex - {"id": 281474976710662, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99}}::vertex - {"id": 281474976710663, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100}}::vertex - {"id": 281474976710664, "label": "", "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100, "n101": 101}}::vertex + {"id": 281474976710657, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48}}::vertex + {"id": 281474976710658, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49}}::vertex + {"id": 281474976710659, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50}}::vertex + {"id": 281474976710660, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51}}::vertex + {"id": 281474976710661, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98}}::vertex + {"id": 281474976710662, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99}}::vertex + {"id": 281474976710663, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100}}::vertex + {"id": 281474976710664, "label": [], "properties": {"n0": 0, "n1": 1, "n2": 2, "n3": 3, "n4": 4, "n5": 5, "n6": 6, "n7": 7, "n8": 8, "n9": 9, "n10": 10, "n11": 11, "n12": 12, "n13": 13, "n14": 14, "n15": 15, "n16": 16, "n17": 17, "n18": 18, "n19": 19, "n20": 20, "n21": 21, "n22": 22, "n23": 23, "n24": 24, "n25": 25, "n26": 26, "n27": 27, "n28": 28, "n29": 29, "n30": 30, "n31": 31, "n32": 32, "n33": 33, "n34": 34, "n35": 35, "n36": 36, "n37": 37, "n38": 38, "n39": 39, "n40": 40, "n41": 41, "n42": 42, "n43": 43, "n44": 44, "n45": 45, "n46": 46, "n47": 47, "n48": 48, "n49": 49, "n50": 50, "n51": 51, "n52": 52, "n53": 53, "n54": 54, "n55": 55, "n56": 56, "n57": 57, "n58": 58, "n59": 59, "n60": 60, "n61": 61, "n62": 62, "n63": 63, "n64": 64, "n65": 65, "n66": 66, "n67": 67, "n68": 68, "n69": 69, "n70": 70, "n71": 71, "n72": 72, "n73": 73, "n74": 74, "n75": 75, "n76": 76, "n77": 77, "n78": 78, "n79": 79, "n80": 80, "n81": 81, "n82": 82, "n83": 83, "n84": 84, "n85": 85, "n86": 86, "n87": 87, "n88": 88, "n89": 89, "n90": 90, "n91": 91, "n92": 92, "n93": 93, "n94": 94, "n95": 95, "n96": 96, "n97": 97, "n98": 98, "n99": 99, "n100": 100, "n101": 101}}::vertex (8 rows) -- @@ -8663,20 +8663,20 @@ SELECT * from cypher('issue_1988', $$ SELECT * FROM cypher('issue_1988', $$ MATCH (p) RETURN p $$) as (p agtype); - p ------------------------------------------------------------------------------------ - {"id": 844424930131969, "label": "Part", "properties": {"part_num": 123}}::vertex - {"id": 844424930131970, "label": "Part", "properties": {"part_num": 345}}::vertex - {"id": 844424930131971, "label": "Part", "properties": {"part_num": 456}}::vertex - {"id": 844424930131972, "label": "Part", "properties": {"part_num": 789}}::vertex + p +------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"part_num": 123}}::vertex + {"id": 844424930131970, "label": ["Part"], "properties": {"part_num": 345}}::vertex + {"id": 844424930131971, "label": ["Part"], "properties": {"part_num": 456}}::vertex + {"id": 844424930131972, "label": ["Part"], "properties": {"part_num": 789}}::vertex (4 rows) SELECT * from cypher('issue_1988', $$ MATCH (p1:Part {part_num: 123}), (p2:Part {part_num: 345}) CREATE (p1)-[u:used_by { quantity: 1 }]->(p2) RETURN p1, u, p2 $$) as (p1 agtype, u agtype, p2 agtype); - p1 | u | p2 ------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"part_num": 123}}::vertex | {"id": 1125899906842625, "label": "used_by", "end_id": 844424930131970, "start_id": 844424930131969, "properties": {"quantity": 1}}::edge | {"id": 844424930131970, "label": "Part", "properties": {"part_num": 345}}::vertex + p1 | u | p2 +-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"part_num": 123}}::vertex | {"id": 1125899906842625, "label": "used_by", "end_id": 844424930131970, "start_id": 844424930131969, "properties": {"quantity": 1}}::edge | {"id": 844424930131970, "label": ["Part"], "properties": {"part_num": 345}}::vertex (1 row) -- should fail @@ -8688,83 +8688,83 @@ LINE 2: MATCH (p:Part { part_num: 123 }) SET p.match = 'xyz' RET... -- should succeed SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`match` = 'xyz' RETURN p $$) as (p agtype); - p ---------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"match": "xyz", "part_num": 123}}::vertex + p +----------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"match": "xyz", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`set` = 'xyz' RETURN p $$) as (p agtype); - p ------------------------------------------------------------------------------------------------------------------ - {"id": 844424930131969, "label": "Part", "properties": {"set": "xyz", "match": "xyz", "part_num": 123}}::vertex + p +------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "xyz", "match": "xyz", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`delete` = 'xyz' RETURN p $$) as (p agtype); - p ----------------------------------------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"set": "xyz", "match": "xyz", "delete": "xyz", "part_num": 123}}::vertex + p +------------------------------------------------------------------------------------------------------------------------------------ + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "xyz", "match": "xyz", "delete": "xyz", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`merge` = 'xyz' RETURN p $$) as (p agtype); - p --------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"set": "xyz", "match": "xyz", "merge": "xyz", "delete": "xyz", "part_num": 123}}::vertex + p +---------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "xyz", "match": "xyz", "merge": "xyz", "delete": "xyz", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`create` = 'xyz' RETURN p $$) as (p agtype); - p -------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"set": "xyz", "match": "xyz", "merge": "xyz", "create": "xyz", "delete": "xyz", "part_num": 123}}::vertex + p +--------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "xyz", "match": "xyz", "merge": "xyz", "create": "xyz", "delete": "xyz", "part_num": 123}}::vertex (1 row) -- should succeed SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`match` = 'match' RETURN p $$) as (p agtype); - p ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"set": "xyz", "match": "match", "merge": "xyz", "create": "xyz", "delete": "xyz", "part_num": 123}}::vertex + p +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "xyz", "match": "match", "merge": "xyz", "create": "xyz", "delete": "xyz", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`set` = 'set' RETURN p $$) as (p agtype); - p ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"set": "set", "match": "match", "merge": "xyz", "create": "xyz", "delete": "xyz", "part_num": 123}}::vertex + p +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "set", "match": "match", "merge": "xyz", "create": "xyz", "delete": "xyz", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`delete` = 'delete' RETURN p $$) as (p agtype); - p ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"set": "set", "match": "match", "merge": "xyz", "create": "xyz", "delete": "delete", "part_num": 123}}::vertex + p +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "set", "match": "match", "merge": "xyz", "create": "xyz", "delete": "delete", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`merge` = 'merge' RETURN p $$) as (p agtype); - p --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 844424930131969, "label": "Part", "properties": {"set": "set", "match": "match", "merge": "merge", "create": "xyz", "delete": "delete", "part_num": 123}}::vertex + p +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "set", "match": "match", "merge": "merge", "create": "xyz", "delete": "delete", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p:Part { part_num: 123 }) SET p.`create` = 'create' RETURN p $$) as (p agtype); - p ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - {"id": 844424930131969, "label": "Part", "properties": {"set": "set", "match": "match", "merge": "merge", "create": "create", "delete": "delete", "part_num": 123}}::vertex + p +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "set", "match": "match", "merge": "merge", "create": "create", "delete": "delete", "part_num": 123}}::vertex (1 row) SELECT * FROM cypher('issue_1988', $$ MATCH (p) RETURN p $$) as (p agtype); - p ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ - {"id": 844424930131970, "label": "Part", "properties": {"part_num": 345}}::vertex - {"id": 844424930131971, "label": "Part", "properties": {"part_num": 456}}::vertex - {"id": 844424930131972, "label": "Part", "properties": {"part_num": 789}}::vertex - {"id": 844424930131969, "label": "Part", "properties": {"set": "set", "match": "match", "merge": "merge", "create": "create", "delete": "delete", "part_num": 123}}::vertex + p +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"id": 844424930131970, "label": ["Part"], "properties": {"part_num": 345}}::vertex + {"id": 844424930131971, "label": ["Part"], "properties": {"part_num": 456}}::vertex + {"id": 844424930131972, "label": ["Part"], "properties": {"part_num": 789}}::vertex + {"id": 844424930131969, "label": ["Part"], "properties": {"set": "set", "match": "match", "merge": "merge", "create": "create", "delete": "delete", "part_num": 123}}::vertex (4 rows) -- diff --git a/regress/expected/list_comprehension.out b/regress/expected/list_comprehension.out index 50fd65542..a00904afe 100644 --- a/regress/expected/list_comprehension.out +++ b/regress/expected/list_comprehension.out @@ -596,13 +596,13 @@ SELECT * FROM cypher('list_comprehension', $$ MATCH (u) WITH *, [i in [1,2,3]] a SELECT * FROM cypher('list_comprehension', $$ MATCH (u) WITH * WHERE u.list=[i IN range(0,12,2)] RETURN u $$) AS (result agtype); result --------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"id": 281474976710657, "label": "", "properties": {"a": [], "b": [0, 1, 2, 3, 4, 5], "c": [0, 2, 4, 6, 8, 10, 12], "list": [0, 2, 4, 6, 8, 10, 12]}}::vertex + {"id": 281474976710657, "label": [], "properties": {"a": [], "b": [0, 1, 2, 3, 4, 5], "c": [0, 2, 4, 6, 8, 10, 12], "list": [0, 2, 4, 6, 8, 10, 12]}}::vertex (1 row) SELECT * FROM cypher('list_comprehension', $$ MATCH (u) WITH * WHERE u.list=[i IN u.list] RETURN u LIMIT 1 $$) AS (result agtype); result ----------------------------------------------------------------------------------------------- - {"id": 281474976710658, "label": "", "properties": {"list": [1, 3, 5, 7, 9, 11, 13]}}::vertex + {"id": 281474976710658, "label": [], "properties": {"list": [1, 3, 5, 7, 9, 11, 13]}}::vertex (1 row) SELECT * FROM cypher('list_comprehension', $$ MATCH (u) WITH * WITH *, [i in [1,2,3]] as list RETURN list LIMIT 1 $$) AS (result agtype); diff --git a/src/backend/commands/label_commands.c b/src/backend/commands/label_commands.c index 1fb4e26f8..b7fb99fcc 100644 --- a/src/backend/commands/label_commands.c +++ b/src/backend/commands/label_commands.c @@ -299,6 +299,9 @@ Datum create_elabel(PG_FUNCTION_ARGS) * For the new label, create an entry in ag_catalog.ag_label, create a * new table and sequence. Returns the oid from the new tuple in * ag_catalog.ag_label. + * + * Note: parameter label_type accepts macros LABEL_TYPE_*, rel_kind + * accepts macros LABEL_REL_KIND_*. */ void create_label(char *graph_name, char *label_name, char label_type, char rel_kind, List *parents) diff --git a/src/backend/parser/cypher_label_expr.c b/src/backend/parser/cypher_label_expr.c index 9a0fa7bbe..0f15f2798 100644 --- a/src/backend/parser/cypher_label_expr.c +++ b/src/backend/parser/cypher_label_expr.c @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + #include "postgres.h" #include "access/genam.h" diff --git a/src/backend/utils/adt/agtype.c b/src/backend/utils/adt/agtype.c index 0e131c0a9..8141011e3 100644 --- a/src/backend/utils/adt/agtype.c +++ b/src/backend/utils/adt/agtype.c @@ -2402,7 +2402,7 @@ Datum _agtype_build_vertex_cstringlabel(PG_FUNCTION_ARGS) rawscalar = build_agtype(bstate); pfree_agtype_build_state(bstate); - PG_FREE_IF_COPY(label, 1); + PG_FREE_IF_COPY(label_name, 1); PG_FREE_IF_COPY(properties, 2); PG_RETURN_POINTER(rawscalar); diff --git a/src/backend/utils/load/age_load.c b/src/backend/utils/load/age_load.c index 815a53bac..c741886aa 100644 --- a/src/backend/utils/load/age_load.c +++ b/src/backend/utils/load/age_load.c @@ -466,7 +466,8 @@ static int32 get_or_create_label(Oid graph_oid, char *graph_name, rv = get_label_range_var(graph_name, graph_oid, default_label); parent = list_make1(rv); - create_label(graph_name, label_name, label_kind, parent); + create_label(graph_name, label_name, label_kind, + LABEL_REL_KIND_SINGLE, parent); label_id = get_label_id(label_name, graph_oid); ereport(NOTICE,