ArcadeDB version
Observed on Docker images:
arcadedata/arcadedb:latest
arcadedata/arcadedb:26.4.1-SNAPSHOT
Environment
- Docker on Windows host
- ArcadeDB queried through the HTTP API:
/api/v1/command/arcade
- Requests sent in the same shape used by ArcadeDB Studio:
language: opencypher
serializer: studio
Describe the bug
An existential pattern predicate in WHERE may fail to filter rows by the target node pattern.
In the repro below, only Alice and Charlie live in Germany.
Bob lives only in United Kingdom, so he should not satisfy:
(p)-[:LIVING_IN]->(:Country {name: 'Germany'})
Neo4j filters Bob out correctly.
ArcadeDB still keeps Bob, which then leaks into later results.
To Reproduce
Setup
CREATE (:Country {name: 'Germany'}),
(:Country {name: 'United Kingdom'}),
(:Person {name: 'Alice'}),
(:Person {name: 'Bob'}),
(:Person {name: 'Charlie'});
MATCH (p:Person {name: 'Alice'}), (c:Country {name: 'Germany'})
CREATE (p)-[:LIVING_IN]->(c);
MATCH (p:Person {name: 'Bob'}), (c:Country {name: 'United Kingdom'})
CREATE (p)-[:LIVING_IN]->(c);
MATCH (p:Person {name: 'Charlie'}), (c:Country {name: 'Germany'})
CREATE (p)-[:LIVING_IN]->(c);
Query
MATCH (p:Person)
WHERE (p)-[:LIVING_IN]->(:Country {name: 'Germany'})
RETURN collect(p.name) AS people;
Expected behavior
Only the two people connected to Germany should remain:
Actual behavior
ArcadeDB returns:
["Alice", "Bob", "Charlie"]
So Bob incorrectly passes the WHERE predicate even though he only lives in United Kingdom.
Stronger variant
The leaked row also affects downstream matching and aggregation:
MATCH (p:Person)
WHERE (p)-[:LIVING_IN]->(:Country {name: 'Germany'})
WITH p
MATCH (p)-[:LIVING_IN]->(c:Country)
RETURN c.name AS country, count(*) AS cnt
ORDER BY country;
Expected:
Observed on ArcadeDB:
Germany, 2
United Kingdom, 1
Neo4j returns only Germany, 2.
Control case
If the same constraint is expressed using an explicit match and a normal property filter, ArcadeDB behaves correctly:
MATCH (p:Person)-[:LIVING_IN]->(c:Country)
WHERE c.name = 'Germany'
WITH p
MATCH (p)-[:LIVING_IN]->(c2:Country)
RETURN c2.name AS country, count(*) AS cnt
ORDER BY country;
Observed result on both Neo4j and ArcadeDB:
This suggests the issue is specifically tied to the existential pattern predicate inside WHERE, not to the later grouping query.
ArcadeDB version
Observed on Docker images:
arcadedata/arcadedb:latestarcadedata/arcadedb:26.4.1-SNAPSHOTEnvironment
/api/v1/command/arcadelanguage: opencypherserializer: studioDescribe the bug
An existential pattern predicate in
WHEREmay fail to filter rows by the target node pattern.In the repro below, only
AliceandCharlielive inGermany.Boblives only inUnited Kingdom, so he should not satisfy:Neo4j filters
Bobout correctly.ArcadeDB still keeps
Bob, which then leaks into later results.To Reproduce
Setup
Query
Expected behavior
Only the two people connected to
Germanyshould remain:Actual behavior
ArcadeDB returns:
So
Bobincorrectly passes theWHEREpredicate even though he only lives inUnited Kingdom.Stronger variant
The leaked row also affects downstream matching and aggregation:
Expected:
Observed on ArcadeDB:
Neo4j returns only
Germany, 2.Control case
If the same constraint is expressed using an explicit match and a normal property filter, ArcadeDB behaves correctly:
Observed result on both Neo4j and ArcadeDB:
This suggests the issue is specifically tied to the existential pattern predicate inside
WHERE, not to the later grouping query.