Skip to content

write/read rescan is rejected inside one Cypher query #2526

Description

@YGY-001
  • Docker image `apache/age:release_PG18_1.8.0

Reproduction

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

SELECT *
FROM ag_catalog.cypher('age_issue_case2', $$
CREATE (a {id: 1})-[:e]->(b {id: 2})
$$) AS (v agtype);

SELECT *
FROM ag_catalog.cypher('age_issue_case2', $$
MERGE ({id: 28})
MERGE p0 = (:l0 {k0: false, id: 29})
WITH tan(toFloat(length(p0))) AS alias0,
     range(6, 14) + [0] AS alias1,
     p0 AS alias2
WHERE true
MATCH p1 = (n0) -[*1..1]-()
RETURN collect(toString(n0.id)) AS alias3
SKIP 0 LIMIT 9
$$) AS (alias3 agtype);

Expected

The valid Cypher query executes and returns the matching path result.

Actual

cypher merge clause cannot be rescanned
HINT: its unsafe to use joins in a query with a Cypher MERGE clause

The corresponding CREATE variant reports cypher create clause cannot be rescanned when the later graph read finds a matching path.

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