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

Ambiguous column reference error when returning variable used in the RHS of SET clause #1884

Open
Zainab-Saad opened this issue May 17, 2024 · 1 comment
Labels
bug Something isn't working override-stale To keep issues/PRs untouched from stale action

Comments

@Zainab-Saad
Copy link
Contributor

Describe the bug
'column reference is ambiguous' error is thrown unexpectedly when trying to return the variable used in right hand side of SET clause

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

  • terminal

What data setup do we need to do?
Can be observed without creating any data

What is the command that caused the error?

SELECT * from cypher('graph', $$
  MATCH(n) SET n.node=n RETURN n
$$) as (a agtype);
ERROR:  column reference "n" is ambiguous

Expected behavior
Should update the property and return the result without error

Environment (please complete the following information):

  • latest (on PG16)
@Zainab-Saad Zainab-Saad added the bug Something isn't working label May 17, 2024
Zainab-Saad added a commit to Zainab-Saad/age that referenced this issue May 17, 2024
The error occured due to SET transform not checking if the target entry
for the RHS item is already present in the query target list and added
the item to tl which resulted in variable name conflict.

Instead transformed the item and added to tl only if target entry for the
var name could not be found

Added regression tests
Copy link

This issue is stale because it has been open 60 days with no activity. Remove "Abondoned" label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale Stale issues/PRs label Jul 17, 2024
@MuhammadTahaNaveed MuhammadTahaNaveed added override-stale To keep issues/PRs untouched from stale action and removed Stale Stale issues/PRs labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working override-stale To keep issues/PRs untouched from stale action
Projects
None yet
Development

No branches or pull requests

2 participants