ArcadeDB version
Verified on:
arcadedata/arcadedb:latest
arcadedata/arcadedb:26.4.1-SNAPSHOT
Observed through the same request shape used by ArcadeDB Studio:
language: opencypher
serializer: studio
Environment
- Docker on Windows host
- ArcadeDB queried through the HTTP API:
/api/v1/command/arcade
- Request mode aligned with ArcadeDB Studio
- Neo4j used as the Cypher reference engine for comparison
Describe the bug
ArcadeDB may ignore a relationship predicate written directly inside the relationship pattern.
In the repro below, only one relationship satisfies r.since < 2019:
Alice -> Bob with since = 2018
Alice -> Charlie with since = 2020
Neo4j returns only the 2018 relationship (in both undirected directions).
ArcadeDB also returns the 2020 relationship, as if the WHERE r.since < 2019 predicate had not been applied.
To Reproduce
Setup
CREATE (a:Person {name: 'Alice'}),
(b:Person {name: 'Bob'}),
(c:Person {name: 'Charlie'}),
(a)-[:KNOWS {since: 2018}]->(b),
(a)-[:KNOWS {since: 2020}]->(c);
Query
MATCH (a:Person)-[r:KNOWS WHERE r.since < 2019]-(b)
WHERE NOT (b:NonexistentLabel)
RETURN DISTINCT a.name AS person, b.name AS friend, r.since AS knowsSince
ORDER BY knowsSince;
Expected behavior
Only the 2018 relationship should match:
Alice, Bob, 2018
Bob, Alice, 2018
Actual behavior
ArcadeDB also returns the 2020 relationship:
Alice, Bob, 2018
Bob, Alice, 2018
Alice, Charlie, 2020
Charlie, Alice, 2020
Control case
Moving the predicate outside the pattern behaves correctly:
MATCH (a:Person)-[r:KNOWS]-(b)
WHERE r.since < 2019
RETURN DISTINCT a.name AS person, b.name AS friend, r.since AS knowsSince
ORDER BY knowsSince;
Expected and observed result:
Alice, Bob, 2018
Bob, Alice, 2018
This suggests the issue is specifically tied to the inline relationship predicate form:
[r:KNOWS WHERE r.since < 2019]
ArcadeDB version
Verified on:
arcadedata/arcadedb:latestarcadedata/arcadedb:26.4.1-SNAPSHOTObserved through the same request shape used by ArcadeDB Studio:
language: opencypherserializer: studioEnvironment
/api/v1/command/arcadeDescribe the bug
ArcadeDB may ignore a relationship predicate written directly inside the relationship pattern.
In the repro below, only one relationship satisfies
r.since < 2019:Alice -> Bobwithsince = 2018Alice -> Charliewithsince = 2020Neo4j returns only the
2018relationship (in both undirected directions).ArcadeDB also returns the
2020relationship, as if theWHERE r.since < 2019predicate had not been applied.To Reproduce
Setup
Query
Expected behavior
Only the
2018relationship should match:Actual behavior
ArcadeDB also returns the
2020relationship:Control case
Moving the predicate outside the pattern behaves correctly:
Expected and observed result:
This suggests the issue is specifically tied to the inline relationship predicate form: