Skip to content

Node label disjunction patterns may match no rows #4211

Description

@Silence6666668

ArcadeDB version
Observed on Docker images:

  • arcadedata/arcadedb:26.4.2

Environment

  • Host OS: Windows 10
  • Architecture: x86_64
  • Deployment: Docker
  • ArcadeDB endpoint: HTTP /api/v1/command/arcade
  • Request mode matches ArcadeDB Studio:
    • language: opencypher
    • serializer: studio
  • Differential comparison target: Neo4j Community 2026.04.0

Describe the bug
ArcadeDB may match no rows for a node pattern that uses a label disjunction such as (n:A|B), even when nodes with both labels clearly exist.

In the minimized repro below, the graph contains one A node and one B node.
Neo4j returns both rows.
ArcadeDB returns no rows.

This does not look like a general label-matching problem, because the same nodes are matched correctly when each label is queried separately.

To Reproduce

Setup:

CREATE (:A {id: 1}),
       (:B {id: 2}),
       (:C {id: 3});

Query:

MATCH (n:A|B)
RETURN n.id AS id
ORDER BY id;

Expected behavior
Observed Neo4j result:

1
2

ArcadeDB should return the same two rows.

Actual behavior
Observed ArcadeDB 26.4.2 result:

0 rows

So the label-disjunction pattern behaves as if no matching nodes exist.

Control cases

Single-label matches work correctly on both engines:

MATCH (n:A) RETURN count(*) AS cnt;
MATCH (n:B) RETURN count(*) AS cnt;
MATCH (n:C) RETURN count(*) AS cnt;

Observed result on Neo4j and ArcadeDB 26.4.2:

cnt = 1

So the data and ordinary label lookup are fine.

The failure is specific to disjunction. Two-label and three-label forms both fail on ArcadeDB:

MATCH (n:A|B) RETURN count(*) AS cnt;
MATCH (n:A|C) RETURN count(*) AS cnt;
MATCH (n:B|C) RETURN count(*) AS cnt;
MATCH (n:A|B|C) RETURN count(*) AS cnt;

Observed results:

  • Neo4j:
    • A|B: 2
    • A|C: 2
    • B|C: 2
    • A|B|C: 3
  • ArcadeDB 26.4.2:
    • all four queries return 0

This makes the boundary much clearer:

  • single-label node pattern: correct
  • label-disjunction node pattern: no rows

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions