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
Cypher self-join on the same edge type can return incorrect empty results on a populated graph #3758
I'm running some queries on stackoverflow dataset that I shared wtih you.
We are seeing what looks like a Cypher engine bug in embedded ArcadeDB, not a client binding issue.
Environment:
ArcadeDB 26.4.1-SNAPSHOT
A co-occurrence query over a populated property graph sometimes returns an empty result set even though the graph clearly contains matching data.
Query under test:
MATCH (q:Question)-[:TAGGED_WITH]->(t1:Tag)
MATCH (q)-[:TAGGED_WITH]->(t2:Tag)
WHEREt1.Id<t2.IdRETURNt1.TagNameAStag1, t2.TagNameAStag2, count(*) AScooccursORDER BYcooccursDESC, tag1ASC, tag2ASCLIMIT10
Expected behavior:
Return the top co-occurring tag pairs.
On our dataset this result is non-empty.
Observed behavior:
Neo4j and LadybugDB return the same non-empty top-10 result for this query.
ArcadeDB has produced an empty result set for the same logical dataset and query shape.
Why this looks like an ArcadeDB issue:
Two other graph engines, Neo4j and LadybugDB, return the same result.
The graph is definitely populated.
A manual reconstruction against the same ArcadeDB database produces the expected non-empty top-10 result.
In a fresh repro, the exact same Cypher query can also return the correct result in ArcadeDB, which suggests the problem may be intermittent or state/plan dependent rather than a syntax issue.
Manual validation logic:
Fetch all tags with their ids and names.
Fetch all (Question)-[:TAGGED_WITH]->(Tag) pairs.
Group tags by question.
Count unique ordered pairs (t1, t2) where t1.Id < t2.Id.
Sort by cooccurs DESC, tag1 ASC, tag2 ASC.
This produces the same non-empty top-10 result that Neo4j and LadybugDB return.
Additional note:
A different equivalent-looking formulation using collect()/UNWIND also produced obviously wrong output in ArcadeDB:
Activity
fix: cypher self-join
lvca commentedon Mar 31, 2026
This should be fixed now, I found 3 issues connected to this use case.
tae898 commentedon Mar 31, 2026
@lvca
actually, now we have more problems #3759
Out of the 10 OLAP cypher queries, it used to be only one that ArcadeDB differs from neo4j and ladybugdb, but now we have 5 mismatches out of 10.
lvca commentedon Mar 31, 2026
No bueno. On it.
lvca commentedon Mar 31, 2026
Fixed by 1872c05
fix: cypher self-join
chore(deps): bump org.postgresql:postgresql from 42.7.7 to 42.7.8 [sk…
chore(deps-dev): bump org.mockito:mockito-core from 5.20.0 to 5.21.0 …
fix: cypher self-join