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

[SMALL] Fix to #30358 - Duplicate table alias in generated select query (An item with the same key has already been added) #30484

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Mar 14, 2023

We were not updating usedAliases list as we uniquify tabke aliases after combining two sources because of JOIN. If the resulting query also needs owned type expanded (when owned type is mapped to a separate table - this expansion happens in translation rather than nav expansion), additional table generated could have incorrect alias. Fix is to update the usedAliases list as we make changes to aliases, so that when new tables are added we generate new aliases correctly.

Fixes #30358

@maumar maumar requested a review from roji March 14, 2023 20:46
@maumar
Copy link
Contributor Author

maumar commented Mar 14, 2023

@ajcvickers patch? it's a regression from 6 and fix is small/safe.

@ajcvickers
Copy link
Member

@maumar Sure, sounds like a good candidate.

…tem with the same key has already been added)

We were not updating usedAliases list as we uniquify tabke aliases after combining two sources because of JOIN. If the resulting query also needs owned type expanded (when owned type is mapped to a separate table - this expansion happens in translation rather than nav expansion), additional table generated could have incorrect alias.
Fix is to update the usedAliases list as we make changes to aliases, so that when new tables are added we generate new aliases correctly.

Fixes #30358
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.

Duplicate table alias in generated select query (An item with the same key has already been added)
3 participants