Skip to content

Invalid reuse of variables in MATCH clause #1002

@MuhammadTahaNaveed

Description

@MuhammadTahaNaveed

Describe the bug
Age is allowing invalid reuse of variables in MATCH clause.

How are you accessing AGE (Command line, driver, etc.)?

  • terminal

What is the command that caused the error?

SELECT * FROM cypher('cypher_match', $$ MATCH p=(p) RETURN p $$)as (p agtype);
ERROR:  column reference "p" is ambiguous
LINE 1: SELECT * FROM cypher('cypher_match', $$ MATCH p=(p) RETURN p $$)as (p...

SELECT * FROM cypher('cypher_vle', $$ MATCH ()-[p]-()-[p *]-() RETURN p $$)as (p agtype);
ERROR:  column reference "p" is ambiguous
LINE 1: ... cypher('cypher_vle', $$ MATCH ()-[p]-()-[p *]-() RETURN p $$)as (p...

Expected behavior
Should have error out with an apropriate message e.g duplicate variable.

Environment (please complete the following information):

  • Version: latest

Additional context
Need to add proper checks for valid variable reuse.

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