Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid reuse of variables in MATCH clause #1002

Closed
MuhammadTahaNaveed opened this issue Jun 22, 2023 · 0 comments · Fixed by #1003
Closed

Invalid reuse of variables in MATCH clause #1002

MuhammadTahaNaveed opened this issue Jun 22, 2023 · 0 comments · Fixed by #1003
Labels
bug Something isn't working

Comments

@MuhammadTahaNaveed
Copy link
Member

MuhammadTahaNaveed commented Jun 22, 2023

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.

@MuhammadTahaNaveed MuhammadTahaNaveed added the bug Something isn't working label Jun 22, 2023
dehowef pushed a commit that referenced this issue Jun 22, 2023
* Fix invalid reuse of variables in MATCH

- Added checks for invalid reuse of variables, mainly path and VLE.
- Added regression tests.

* Fix invalid reuse of variables in MATCH (VLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant