Skip to content

any(...) list predicates may be evaluated correctly as expressions in RETURN, but ignored or inverted when used in WHERE. #3888

@Silence6666668

Description

@Silence6666668

ArcadeDB version

ArcadeDB version:26.4.1-SNAPSHOT
Observed on Docker images:

  • arcadedata/arcadedb:latest

Environment

  • Docker on Windows host
  • ArcadeDB queried through the HTTP API: /api/v1/command/arcade
  • Requests sent in the same shape used by ArcadeDB Studio:
    • language: opencypher
    • serializer: studio

Describe the bug

any(...) list predicates may be evaluated correctly as expressions in RETURN, but ignored or inverted when used in WHERE.

In the repro below, only Alice satisfies:

any(x IN ['Alice'] WHERE x = p.name)

Neo4j correctly returns only Alice.
ArcadeDB returns all rows, as if the WHERE any(...) predicate were always true.

The complementary form with NOT any(...) also behaves incorrectly in the opposite direction, returning no rows when all rows should survive.

To Reproduce

Setup

CREATE (:Person {name:'Alice'}),
       (:Person {name:'Bob'}),
       (:Person {name:'Charlie'});

Query

MATCH (p:Person)
WHERE any(x IN ['Alice'] WHERE x = p.name)
RETURN p.name AS name
ORDER BY name;

Expected behavior

Only Alice should match:

Alice

Actual behavior

ArcadeDB returns:

Alice
Bob
Charlie

So the WHERE any(...) filter does not restrict rows correctly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions