Skip to content

Filter NOT EXISTS leads to an error if a relation label does not exists as database table #1399

@nupis-DanielS

Description

@nupis-DanielS

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions