Skip to content

Cypher/GFQL WHERE cannot mix generic row predicates with pattern predicates #1031

@lmeyerov

Description

@lmeyerov

Problem

Current local Cypher/GFQL validation rejects WHERE clauses that mix a generic row predicate with a pattern predicate in the same boolean expression.

Current measured error:

[unsupported-cypher-query] Cypher WHERE pattern predicates cannot yet be mixed with generic row expressions

Benchmark Impact

This is now benchmark-backed from pyg-bench on current master 14dafaf6b951954d8de840f9236f3e874249ebac.

Official LDBC SNB Interactive lane:

  • interactive-complex-10 / common-interest-score
  • artifact: /home/lmeyerov/Work/pyg-bench/results/runs/dgx-spark-snb-interactive-ic10-origin-master-14dafaf6b9-fresh-r1
  • direct Cypher: primitive_gap
  • GFQL: workaround-backed partial under #880

Minimal Shape

MATCH (person:Person {id: $personId})-[:KNOWS*2..2]-(friend),
      (friend)-[:IS_LOCATED_IN]->(city:City)
WHERE NOT friend=person AND
      NOT (friend)-[:KNOWS]-(person)
RETURN friend.id

The important part is the mixed WHERE condition:

  • generic row expression: NOT friend=person
  • pattern predicate: NOT (friend)-[:KNOWS]-(person)

Why This Matters

This is a real official benchmark blocker on current master, not just a parser nicety:

  • exact-2-hop recommendation shapes are common benchmark work
  • the official query is otherwise staged and measurable in the benchmark harness
  • the failure happens before direct execution, so it blocks clean benchmark coverage for the direct Cypher path

Expected Direction

Support mixed WHERE boolean expressions that combine:

  • generic row comparisons / equality predicates
  • pattern predicates

without forcing the benchmark harness to rewrite the official query into a non-faithful form.

Related

  • benchmark coverage meta issue: #992
  • residual GFQL workaround umbrella: #880
  • benchmark artifact: /home/lmeyerov/Work/pyg-bench/results/runs/dgx-spark-snb-interactive-ic10-origin-master-14dafaf6b9-fresh-r1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions