You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Variable-length relationship patterns with a zero lower bound may fail to produce the expected zero-hop self-binding. #2382
Describe the bug
Variable-length relationship patterns with a zero lower bound may fail to produce the expected zero-hop self-binding.
In the repro below, the graph contains a single Person node and no FRIEND relationships. Under Cypher semantics, the pattern [:FRIEND*0..1] should still match with length 0, so f should bind to the same node as p.
Instead, Apache AGE returns f = null, and collect(f.name) becomes [] instead of ['Alice'].
How are you accessing AGE (Command line, driver, etc.)?
PostgreSQL cypher(...) wrapper through the local Python differential-testing harness
Reproducible directly in psql inside the Docker container
What data setup do we need to do?
SELECT*FROM cypher('fuzz_graph', $$
CREATE (:Person {name: 'Alice'})
$$) AS (v agtype);
What is the necessary configuration info needed?
Plain Apache AGE Docker image was enough
Docker image in local repro: apache/age
AGE extension version: 1.7.0
PostgreSQL version: 18.1
Graph name used in repro: fuzz_graph
No extra extensions or special configuration were required
What is the command that caused the error?
SELECT*FROM cypher('fuzz_graph', $$
MATCH (p:Person {name: 'Alice'})
OPTIONAL MATCH (p)-[:FRIEND*0..1]-(f:Person)
RETURN p.nameAS person, f.nameAS friend
$$) AS (person agtype, friend agtype);
Returned result on AGE:
person | friend
-------+-------
Alice | null
Expected behavior
The zero-hop match should bind f to the same node as p, so the expected result is:
person | friend
-------+-------
Alice | Alice
Neo4j returns exactly that result for the equivalent Cypher query.
Environment (please complete the following information):
Activity
Fix VLE [*0..N] zero-hop self-binding when edge label is missing (apa…
Fix VLE [*0..N] zero-hop self-binding when edge label is missing (apa…
Fix VLE [*0..N] zero-hop self-binding when edge label is missing (#2382…
Fix VLE [*0..N] zero-hop self-binding when edge label is missing (#2382…