mingfang opened a new issue, #1709:
URL: https://github.com/apache/age/issues/1709
when creating multiple vertices like this
```sql
SELECT * FROM cypher('playground', $$
UNWIND [{first: 'jon', last: 'snow'}, {first: 'ned', last: 'stark'}] AS map
MERGE (v:PERSON {first: map.first})
SET v=map
RETURN count(v)
$$) AS (v agtype)
```
returns count of 2, but all the vertices after the first one will be
incomplete. e.g.
```sql
SELECT * FROM cypher('playground', $$
MATCH (v:PERSON)
RETURN v
$$) AS (v agtype)
```
returns
```shell
{"id": 3940649673949198, "label": "PERSON", "properties": {"last": "snow",
"first": "jon"}}::vertex
{"id": 3940649673949199, "label": "PERSON", "properties": {"first":
"ned"}}::vertex
```
Note the first vertex is correct but the second vertex is missing the "last"
field. Very strange.
But it works if I change the `RETURN` clause to include the vertex variable
like this
```sql
SELECT * FROM cypher('playground', $$
UNWIND [{first: 'jon', last: 'snow'}, {first: 'ned', last: 'stark'}] AS map
MERGE (v:PERSON {first: map.first})
SET v=map
RETURN v
$$) AS (v agtype)
```
works correctly and returns
```shell
{"id": 3940649673949196, "label": "PERSON", "properties": {"last": "snow",
"first": "jon"}}::vertex
{"id": 3940649673949197, "label": "PERSON", "properties": {"last": "stark",
"first": "ned"}}::vertex
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]