You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Filter NOT EXISTS leads to an error if a relation label does not exists as database table #1399
Describe the bug
We run in an error if we query for a non existing relationship. If the filter contains the label of the relationship it will return "Variable foo does not exist". When the relationship label is not used everything works as expected. It looks like that the error occurs only when the database table for the label is not present..
How are you accessing AGE (Command line, driver, etc.)?
JDBC
pg (Node)
What data setup do we need to do?
/
What is the necessary configuration info needed?
/
What is the command that caused the error?
SELECT*FROM cypher('property-graph', $$
MATCH (foo)
WHERE NOT exists((foo)-[:BAR]->())
RETURN count(foo) >0
$$) as (c agtype)
Variable `foo` does not exist
Expected behavior
false
Environment (please complete the following information):
Version: 1.4.0
PostgreSQL: 14.6 (Ubuntu 14.6-1.pgdg22.04+1)
Additional context
Without non existing relation label it works as expected (result -> false).
Hi @nupis-DanielS! Thank you for letting us know about this issue. Our technical team will go through it and provide a solution soon. In the meantime, please feel free to reach out if you have any other questions.
psql-15.4-5432-pgsql=# SELECT * FROM cypher('property-graph', $$ MATCH (foo) WHERE NOT exists((foo)-[:BAR]->()) RETURN count(foo) > 0 $$) as (c agtype)
;
ERROR: variable `foo` does not exist
LINE 1: ...property-graph', $$ MATCH (foo) WHERE NOT exists((foo)-[:BAR...
^
psql-15.4-5432-pgsql=# SELECT * FROM cypher('property-graph', $$ create ()-[:BAR]->() $$) as (c agtype) ;
c
---
(0 rows)
psql-15.4-5432-pgsql=# SELECT * FROM cypher('property-graph', $$ MATCH (foo) WHERE NOT exists((foo)-[:BAR]->()) RETURN count(foo) > 0 $$) as (c agtype)
;
c
------
true
(1 row)
psql-15.4-5432-pgsql=#
@nupis-DanielS The fix is now in the master branch. If you could verify that it satisfactorily resolves your issue and close it, that would be great.
Hi @jrgemignani . We would love to test this but we use the "PG14" Branch. I think we will create a separate PG14 branch and cherry pick your commit. We close this issue if everything works as expected.
Hi @jrgemignani . We would love to test this but we use the "PG14" Branch. I think we will create a separate PG14 branch and cherry pick your commit. We close this issue if everything works as expected.
Thank you
@nupis-DanielS The fix is now on PG14 branch as well. It would be great if you could check it out.
Activity
jimenasansav commentedon Nov 15, 2023
Hi @nupis-DanielS! Thank you for letting us know about this issue. Our technical team will go through it and provide a solution soon. In the meantime, please feel free to reach out if you have any other questions.
jrgemignani commentedon Nov 15, 2023
@nupis-DanielS I will look into this. Related to #1393
Fix issue apache#1399 EXISTS doesn't handle non-existent labels
jrgemignani commentedon Nov 16, 2023
@nupis-DanielS PR #1400 should resolve this once reviewed and merged.
Fix issue apache#1399 EXISTS doesn't handle non-existent labels
Fix issue #1399 EXISTS doesn't handle non-existent labels (#1400)
jrgemignani commentedon Nov 16, 2023
@nupis-DanielS The fix is now in the master branch. If you could verify that it satisfactorily resolves your issue and close it, that would be great.
Fix issue apache#1399 EXISTS doesn't handle non-existent labels (apac…
Fix issue apache#1399 EXISTS doesn't handle non-existent labels (apac…
Fix issue apache#1399 EXISTS doesn't handle non-existent labels (apac…
Fix issue apache#1399 EXISTS doesn't handle non-existent labels (apac…
Fix issue apache#1399 EXISTS doesn't handle non-existent labels (apac…
nupis-DanielS commentedon Nov 17, 2023
Hi @jrgemignani . We would love to test this but we use the "PG14" Branch. I think we will create a separate PG14 branch and cherry pick your commit. We close this issue if everything works as expected.
Thank you
Fix issue #1399 EXISTS doesn't handle non-existent labels (#1400) (#1403
Fix issue #1399 EXISTS doesn't handle non-existent labels (#1404)
Fix issue #1399 EXISTS doesn't handle non-existent labels (#1405)
MuhammadTahaNaveed commentedon Nov 17, 2023
@nupis-DanielS The fix is now on PG14 branch as well. It would be great if you could check it out.
Fix issue #1399 EXISTS doesn't handle non-existent labels (#1406)
nupis-DanielS commentedon Nov 17, 2023
Hello again @jrgemignani. Your fix works. The query returns successful even if the relationship label does not exist in the database. Thank you
Fix issue #1399 EXISTS doesn't handle non-existent labels (#1400)
Fix issue apache#1399 EXISTS doesn't handle non-existent labels (apac…
Added integer conversion in toBoolean functions