GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cypher self-join on the same edge type can return incorrect empty results on a populated graph · Issue #3758 · ArcadeData/arcadedb

Cypher self-join on the same edge type can return incorrect empty results on a populated graph #3758

New issue
Copy link
New issue
Copy link
Closed
Bug
Closed
Cypher self-join on the same edge type can return incorrect empty results on a populated graph#3758
Bug
Copy link
Assignees
lvca
Milestone
26.4.2

Description

@tae898
tae898
opened on Mar 30, 2026
Issue body actions

@lvca

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)
WHERE t1.Id < t2.Id
RETURN t1.TagName AS tag1, t2.TagName AS tag2, count(*) AS cooccurs
ORDER BY cooccurs DESC, tag1 ASC, tag2 ASC
LIMIT 10

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:

  1. Fetch all tags with their ids and names.
  2. Fetch all (Question)-[:TAGGED_WITH]->(Tag) pairs.
  3. Group tags by question.
  4. Count unique ordered pairs (t1, t2) where t1.Id < t2.Id.
  5. Sort by cooccurs DESC, tag1 ASC, tag2 ASC.
  6. 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:

MATCH (q:Question)-[:TAGGED_WITH]->(t:Tag)
WITH q, collect(t) AS tags
UNWIND tags AS t1
UNWIND tags AS t2
WITH t1, t2
WHERE t1.Id < t2.Id
RETURN t1.TagName AS tag1, t2.TagName AS tag2, count(*) AS cooccurs
ORDER BY cooccurs DESC, tag1 ASC, tag2 ASC
LIMIT 10

In that case we observed a single row with null tag names and a large count, which also points to a Cypher execution issue around this pattern.

Activity

  1. lvca
    self-assigned this
    on Mar 30, 2026
  2. lvca
    added the
    Bug
    issue type on Mar 30, 2026
  3. lvca
    added this to the 26.4.1 milestone on Mar 30, 2026
  4. lvca
    added a commit that references this issue on Mar 31, 2026

    fix: cypher self-join

    60257e1
  5. lvca commented on Mar 31, 2026

    @lvca
    lvca
    on Mar 31, 2026
    Member
    More actions

    This should be fixed now, I found 3 issues connected to this use case.

    Reacted by Taewoon Kim
  6. lvca
    closed this as completedon Mar 31, 2026
  7. tae898 commented on Mar 31, 2026

    @tae898
    tae898
    on Mar 31, 2026
    ContributorAuthor
    More actions

    @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.

  8. lvca commented on Mar 31, 2026

    @lvca
    lvca
    on Mar 31, 2026
    Member
    More actions

    No bueno. On it.

    Reacted by Taewoon Kim
  9. lvca
    reopened this on Mar 31, 2026
  10. lvca commented on Mar 31, 2026

    @lvca
    lvca
    on Mar 31, 2026
    Member
    More actions

    Fixed by 1872c05

  11. lvca
    closed this as completedon Mar 31, 2026
  12. robfrank
    added a commit that references this issue on May 12, 2026

    fix: cypher self-join

    dab3f2f
  13. tae898
    added 3 commits that reference this issue on Jun 28, 2026

    chore(deps): bump org.postgresql:postgresql from 42.7.7 to 42.7.8 [sk…

    45a55e2

    chore(deps-dev): bump org.mockito:mockito-core from 5.20.0 to 5.21.0 …

    e2d3f51

    fix: cypher self-join

    3653e90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

No labels
No labels

Type

Bug

Projects

No projects

    Milestone

    • 26.4.2

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.