age
age copied to clipboard
WITH ignores WHERE condition
Describe the bug Using a WHERE after WITH after MATCH ignores condition
How are you accessing AGE (Command line, driver, etc.)? -pgsql inside docker container
What data setup do we need to do? Using the sample city/country data in age/regress/age_load/data/
pgsql
MATCH (m:City) - [:has_city] -> (b:Country{iso2:'BE'}) with b,m where m.name='x' return m.name,b.iso2 $$) as ( "m.name" agtype, "b" agtype);
returns 550 rows
Expected behavior Should return 0 rows due to m.name='x' WHERE condition on WITH
Environment :
- Version: latest docker image apache/age:latest
Additional info With/Where Ref: https://neo4j.com/docs/cypher-manual/current/clauses/where/
We will take a look.
I was able to reproduce this on the master branch -
psql-11.5-5432-pgsql=# SELECT * FROM cypher('g', $$ match (u:node) where u.name = 'x' RETURN u.name $$) AS (b agtype);
b
---
(0 rows)
psql-11.5-5432-pgsql=# SELECT * FROM cypher('g', $$ match (u:node) with u where u.name = 'x' RETURN u.name $$) AS (b agtype);
b
-----
"a"
(1 row)
psql-11.5-5432-pgsql=#