Skip to content

query_graph: UNWIND is parsed but silently ignored (README says supported / should error) #1192

Description

@eazene

Summary

query_graph accepts UNWIND without error but never executes it — the clause is parsed and then ignored by the executor, so the rest of the query runs as if the UNWIND were absent. This contradicts the README, which both lists UNWIND as supported and states that unsupported syntax "fails with a clear unsupported … error." Instead the user gets a silently wrong result.

Reproduction (v0.9.0)

query_graph:
  UNWIND [1,2,3] AS x MATCH (f:Function) WHERE f.name = 'main' RETURN f.name

Expected (per README): either 3× row multiplication, or a clear "unsupported" error.
Actual: the UNWIND is ignored; the MATCH runs once and returns its rows with no error and no warning.

Location

Parser accepts UNWIND (src/cypher/cypher.c:1832-1866) but the executor loop (cypher.c:4635-4694) has no UNWIND handling, so x is never bound and no row expansion occurs.

Suggested fix

Either implement UNWIND (bind the list elements and cross-product with subsequent MATCH/RETURN), or — consistent with the documented contract — reject it with the same unsupported … error path used for other unimplemented clauses so it fails loudly instead of silently.

Related

A sibling correctness gap: comparisons against unbound OPTIONAL MATCH variables evaluate TRUE (~cypher.c:2611-2612), which is also a silent-wrong-answer path. Happy to file separately if preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcypherCypher query language parser/executor bugsparsing/qualityGraph extraction bugs, false positives, missing edgespriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.ux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions