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

The same alias is sometimes used in multiple (non-conflicting) aliases #32778

Open
roji opened this issue Jan 10, 2024 · 1 comment
Open

The same alias is sometimes used in multiple (non-conflicting) aliases #32778

roji opened this issue Jan 10, 2024 · 1 comment

Comments

@roji
Copy link
Member

roji commented Jan 10, 2024

We generally try to assign unique aliases to tables in the SQL tree. However, in some cases we do reuse the same alias; this occurs in non-conflicting contexts, i.e. where there's no scope overlap between the two contexts. So there's no functional impact at the moment as far as we know (though there may be databases out there which could have a problem with this); it's still a good idea to keep aliases as unique as possible for readability, at the very least.

roji added a commit to roji/efcore that referenced this issue Jan 11, 2024
roji added a commit to roji/efcore that referenced this issue Jan 11, 2024
roji added a commit to roji/efcore that referenced this issue Jan 11, 2024
roji added a commit to roji/efcore that referenced this issue Jan 15, 2024
roji added a commit that referenced this issue Jan 15, 2024
@ajcvickers ajcvickers added this to the Backlog milestone Jan 17, 2024
@roji
Copy link
Member Author

roji commented Jan 17, 2024

Note: this will likely never fully go away... Once source of duplicate table aliases is when we clone a tree fragment and then reintegrate the result back into the tree (i.e. GroupBy). But another is e.g. null semantics processor which also adds compensation clauses, causing the same instance to get referenced multiple times in the tree (this is also not great for perf, of course).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants