Problem
EXISTS subqueries (WHERE EXISTS { MATCH ... }) are not implemented. Queries using this syntax either fail to parse or execute incorrectly.
Remaining TCK Failures (as of Phase 9, 7 scenarios)
test_simple_subquery_without_where_clause
test_simple_subquery_without_where_clause_not_existing_pattern
test_simple_subquery_with_where_clause
test_simple_subquery_with_where_clause_not_existing_pattern
test_nested_simple_existential_subquery
test_nested_full_existential_subquery_with_pattern_predicate
test_full_existential_subquery_with_update_clause_should_fail
Failure Details
- Simple EXISTS without WHERE (2):
WHERE EXISTS { MATCH (n)-->(m) }
- Simple EXISTS with WHERE (2):
WHERE EXISTS { MATCH (n)-->(m) WHERE m.prop = 'x' }
- Nested EXISTS (1): EXISTS inside EXISTS
- EXISTS with pattern predicate (1):
WHERE EXISTS { (n)-[:R]->(m) } combined with other predicates
- EXISTS with update clause should fail (1):
EXISTS { CREATE (n) } should raise SyntaxError at compile time
Layers Affected
All four: grammar (cypher.lark), AST (ast/), planner (planner.py), executor (executor.py / evaluator.py).
Acceptance Criteria
Problem
EXISTS subqueries (
WHERE EXISTS { MATCH ... }) are not implemented. Queries using this syntax either fail to parse or execute incorrectly.Remaining TCK Failures (as of Phase 9, 7 scenarios)
Failure Details
WHERE EXISTS { MATCH (n)-->(m) }WHERE EXISTS { MATCH (n)-->(m) WHERE m.prop = 'x' }WHERE EXISTS { (n)-[:R]->(m) }combined with other predicatesEXISTS { CREATE (n) }should raiseSyntaxErrorat compile timeLayers Affected
All four: grammar (
cypher.lark), AST (ast/), planner (planner.py), executor (executor.py/evaluator.py).Acceptance Criteria
WHERE EXISTS { MATCH (n)-->(m) }evaluates to true/false correctlyWHERE EXISTS { MATCH (n)-->(m) WHERE m.active = true }filters by subquery conditionEXISTS { EXISTS { ... } }evaluates correctlyEXISTS { CREATE (n) }raisesSyntaxErrorat compile time