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

Fix issue #876 - column reference "_age_default_alias_0" is ambiguous #931

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

MuhammadTahaNaveed
Copy link
Member

@MuhammadTahaNaveed MuhammadTahaNaveed commented May 16, 2023

  • The problem was with get_next_default_alias function which was not generating unique aliases.
  • Every clause transformed as a subquery has its own cpstate which is being freed after it is tranformed. The root cpstate is the one that has the default_alias_number initialized. So we need to reach the root cpstate to get the next correct default alias number.
  • This change also fixed some previously incorrect results (verified using neo4j).
  • Added additional regression tests.

Resolves #876

Copy link
Contributor

@jrgemignani jrgemignani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor coding issue.

src/backend/parser/cypher_parse_node.c Show resolved Hide resolved
…iguous

- The problem was with get_next_default_alias function which was not
  generating unique aliases.
- Every clause transformed as a subquery has its own cpstate which is
  being freed after it is tranformed. The root cpstate is the one that
  has the default_alias_number initialized. So we need to reach the
  root cpstate to get the next correct default alias number.
- This change also fixed some previously incorrect results.
- Added additional regression tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected Error: column reference "_age_default_alias_0" is ambiguous
2 participants