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
Uncorrelated pattern predicate may evaluate as false even when relationships exist #4110
Describe the bug
ArcadeDB may evaluate a bare uncorrelated pattern predicate such as:
()-[]->()
as if it were false, even when the graph clearly contains relationships.
In Cypher, this kind of bare pattern in WHERE is an existence test. If any matching relationship exists in the graph, the predicate should evaluate to true for every outer row.
To Reproduce
Setup:
CREATE (:Person{name:'Alice'}),
(:Person{name:'Bob'});
MATCH (a:Person{name:'Alice'}), (b:Person{name:'Bob'})
CREATE (a)-[:KNOWS]->(b);
Query:
MATCH (p:Person)
WHERE ()-[]->()
RETURNp.nameASnameORDER BYname;
Expected behavior
Since the graph contains a relationship, the predicate should be true for every row.
Observed Neo4j result:
Alice
Bob
Actual behavior
Observed ArcadeDB result:
0 rows
So the uncorrelated pattern predicate behaves as if no relationship exists.
Control cases
If the same existence test is expressed as an EXISTS subquery, ArcadeDB behaves correctly:
MATCH (p:Person)
WHEREEXISTS{MATCH ()-[]->() }RETURNp.nameASnameORDER BYname;
Observed result on both Neo4j and ArcadeDB:
Alice
Bob
The polarity is also inverted incorrectly under NOT:
MATCH (p:Person)
WHERENOT ()-[]->()
RETURNp.nameASnameORDER BYname;
Expected:
0 rows
Observed ArcadeDB result:
Alice
Bob
If the graph has no relationships, ArcadeDB agrees with Neo4j:
CREATE (:Person{name:'Alice'}),
(:Person{name:'Bob'});
MATCH (p:Person)
WHERE ()-[]->()
RETURNp.nameASnameORDER BYname;
Observed result on both Neo4j and ArcadeDB:
0 rows
So the issue is specifically in how ArcadeDB evaluates the bare uncorrelated pattern predicate, not in setup or row production more generally.
Activity
fix: cypher issues with WHERE / pattern-predicate evaluator
lvca commentedon May 6, 2026
Fixed.
fix: cypher issues with WHERE / pattern-predicate evaluator
fix: cypher issues with WHERE / pattern-predicate evaluator
fix: cypher issues with WHERE / pattern-predicate evaluator