Skip to content

Multi-row CREATE followed by a second CREATE reports vertex assigned to variable n0 was deleted #2528

Description

@YGY-001

Docker image apache/age:release_PG18_1.7.0

Reproduction

LOAD 'age';
SET search_path = ag_catalog, public;
SELECT ag_catalog.create_graph('age_issue_case5');

SELECT *
FROM ag_catalog.cypher('age_issue_case5', $$
UNWIND [-1452595301,16630552,2131315115] AS alias0
CREATE (n0 {id: 38, k0: 'lg', k1: -1164920309, klist: []})
WITH *
CREATE p0 = (n0) <-[r0:rt0 {k0: 'd', k1: 1141735256,
                              id: 90, klist: ['zt', '5', '4']}]-
            (n1 {id: 39, k0: 'i', klist: ['Ifg', 'h8']})
WITH alias0, n1.k0 AS alias1, lTrim(toString(n0.k0)) AS alias2,
     sqrt(abs(toFloat(r0.id))) AS alias3,
     n0, n1 AS alias4, r0 AS alias5, p0
RETURN collect(toString(alias5.k0)) AS alias6
$$) AS (alias6 agtype);

Expected

n0 remains bound across the WITH barrier for every row produced by
UNWIND, and the query returns the collected relationship property.

Actual

vertex assigned to variable n0 was deleted

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions