ArcadeDB version
Observed on local Docker image:
docker inspect arcadedb -> arcadedata/arcadedb:latest
docker exec arcadedb find /home/arcadedb/lib -name 'arcadedb-server-*.jar'
/home/arcadedb/lib/arcadedb-server-26.7.2-SNAPSHOT.jar
ArcadeDB version: 26.7.2-SNAPSHOT
Build: f88429c1
Endpoint:
http://127.0.0.1:2480/api/v1/command/test
Environment
Description
ArcadeDB returns the wrong result for all() when the input list is produced by a pattern comprehension.
The failing query collects each active user's friends' active values through a pattern comprehension, then flags users whose friend list is non-empty and contains only inactive friends:
MATCH (u:User {active: true})
WITH u, [(u)-[:FRIEND]->(f:User) | f.active] AS actives
WHERE size(actives) > 0 AND all(a IN actives WHERE a = false)
SET u.flagged = true;
On a small 6-node graph, ArcadeDB returns the correct result. On a deterministic 35-node graph generated with seed 42, the same query returns the wrong result.
The equivalent formulation using explicit MATCH + collect() works correctly on the same 35-node graph, which isolates the failure to the pattern-comprehension list used by all().
Neo4j and Memgraph return the expected result.
To reproduce
Run from a clean database.
1. Small graph baseline — correct on ArcadeDB
MATCH (n) DETACH DELETE n;
CREATE
(u1:User {id:1, active:true}),
(u2:User {id:2, active:true}),
(u3:User {id:3, active:true}),
(u4:User {id:4, active:false}),
(u5:User {id:5, active:false}),
(u6:User {id:6, active:false}),
(u1)-[:FRIEND]->(u4),
(u1)-[:FRIEND]->(u5),
(u2)-[:FRIEND]->(u4),
(u2)-[:FRIEND]->(u1),
(u3)-[:FRIEND]->(u5),
(u3)-[:FRIEND]->(u6);
Expected reasoning:
u1 friends: [false, false] => all inactive => flag
u2 friends: [false, true] => has active => do not flag
u3 friends: [false, false] => all inactive => flag
Query:
MATCH (u:User {active: true})
WITH u, [(u)-[:FRIEND]->(f:User) | f.active] AS actives
WHERE size(actives) > 0 AND all(a IN actives WHERE a = false)
SET u.flagged = true;
MATCH (u:User)
WHERE u.flagged = true
RETURN u.id AS id
ORDER BY id;
ArcadeDB result:
This is correct.
2. Larger graph — wrong result on ArcadeDB
The attached Python reproducer builds a deterministic 35-node graph using seed 42.
The graph contains:
20 active User nodes
15 inactive User nodes
random FRIEND edges generated from seed 42
Run the same query:
MATCH (u:User {active: true})
WITH u, [(u)-[:FRIEND]->(f:User) | f.active] AS actives
WHERE size(actives) > 0 AND all(a IN actives WHERE a = false)
SET u.flagged = true;
MATCH (u:User)
WHERE u.flagged = true
RETURN count(*) AS cnt;
Expected behavior
On the 35-node graph generated with seed 42, exactly 2 active users have a non-empty friend list where all friends are inactive.
Expected result:
Neo4j 2026.05.0 returns:
Memgraph 3.11.0 returns:
Actual behavior
ArcadeDB returns:
No error or warning is reported.
Read-only diagnostic query
This query exposes the pattern-comprehension list and all() result per user without performing writes:
MATCH (u:User {active: true})
WITH u, [(u)-[:FRIEND]->(f:User) | f.active] AS actives
RETURN
u.id AS id,
actives,
size(actives) AS sz,
all(a IN actives WHERE a = false) AS all_inactive
ORDER BY id;
On the same 35-node graph, Neo4j and Memgraph identify 2 users with:
sz > 0
all_inactive = true
ArcadeDB returns all_inactive = false for those same expected users.
Control: explicit MATCH + collect() works on ArcadeDB
Using explicit MATCH + collect() instead of pattern comprehension returns the correct result on the same 35-node graph:
MATCH (u:User {active: true})-[:FRIEND]->(f:User)
WITH u, collect(f.active) AS actives
WHERE size(actives) > 0 AND all(a IN actives WHERE a = false)
RETURN count(DISTINCT u) AS cnt;
ArcadeDB result:
So all() can evaluate correctly when the list is produced by collect(). The wrong result appears when the list is produced by pattern comprehension.
Cross-engine comparison
35-node graph, seed 42:
| Engine |
Pattern comprehension + all() |
Neo4j 2026.05.0 |
cnt = 2 |
Memgraph 3.11.0 |
cnt = 2 |
ArcadeDB 26.7.2-SNAPSHOT |
cnt = 0 |
Same graph, ArcadeDB only:
| Query form |
ArcadeDB result |
pattern comprehension + all() |
cnt = 0 |
explicit MATCH + collect() + all() |
cnt = 2 |
Summary
| Query shape |
6-node graph |
35-node graph |
pattern comprehension + all() |
correct |
wrong |
explicit MATCH + collect() + all() |
correct |
correct |
Why this looks like a bug
The query is semantically valid and returns the expected result on Neo4j and Memgraph.
ArcadeDB also returns the correct result on a small graph, and the equivalent MATCH + collect() formulation works correctly on the same 35-node graph.
The failure appears specific to the interaction between pattern-comprehension list evaluation and all() on the larger graph. I am not claiming a fixed threshold here; the attached deterministic reproducer is intended to make the failing graph state exact.
ArcadeDB version
Observed on local Docker image:
Environment
Host OS: Linux
Deployment: Docker
Query interface: HTTP
/api/v1/command/testQuery language: Cypher
Differential comparison targets:
2026.05.03.11.0Description
ArcadeDB returns the wrong result for
all()when the input list is produced by a pattern comprehension.The failing query collects each active user's friends'
activevalues through a pattern comprehension, then flags users whose friend list is non-empty and contains only inactive friends:On a small 6-node graph, ArcadeDB returns the correct result. On a deterministic 35-node graph generated with seed
42, the same query returns the wrong result.The equivalent formulation using explicit
MATCH + collect()works correctly on the same 35-node graph, which isolates the failure to the pattern-comprehension list used byall().Neo4j and Memgraph return the expected result.
To reproduce
Run from a clean database.
1. Small graph baseline — correct on ArcadeDB
Expected reasoning:
Query:
ArcadeDB result:
This is correct.
2. Larger graph — wrong result on ArcadeDB
The attached Python reproducer builds a deterministic 35-node graph using seed
42.The graph contains:
Run the same query:
Expected behavior
On the 35-node graph generated with seed
42, exactly 2 active users have a non-empty friend list where all friends are inactive.Expected result:
Neo4j
2026.05.0returns:Memgraph
3.11.0returns:Actual behavior
ArcadeDB returns:
No error or warning is reported.
Read-only diagnostic query
This query exposes the pattern-comprehension list and
all()result per user without performing writes:On the same 35-node graph, Neo4j and Memgraph identify 2 users with:
ArcadeDB returns
all_inactive = falsefor those same expected users.Control: explicit
MATCH + collect()works on ArcadeDBUsing explicit
MATCH + collect()instead of pattern comprehension returns the correct result on the same 35-node graph:ArcadeDB result:
So
all()can evaluate correctly when the list is produced bycollect(). The wrong result appears when the list is produced by pattern comprehension.Cross-engine comparison
35-node graph, seed
42:all()2026.05.0cnt = 23.11.0cnt = 226.7.2-SNAPSHOTcnt = 0Same graph, ArcadeDB only:
all()cnt = 0MATCH + collect()+all()cnt = 2Summary
all()MATCH + collect()+all()Why this looks like a bug
The query is semantically valid and returns the expected result on Neo4j and Memgraph.
ArcadeDB also returns the correct result on a small graph, and the equivalent
MATCH + collect()formulation works correctly on the same 35-node graph.The failure appears specific to the interaction between pattern-comprehension list evaluation and
all()on the larger graph. I am not claiming a fixed threshold here; the attached deterministic reproducer is intended to make the failing graph state exact.