-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Don't ask how! 😢 #21707
Don't ask how! 😢 #21707
Conversation
Hello @smitpatel! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@msftbot require 1 approval |
Hello @smitpatel! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
Wouldn't this allow a hash collision? |
Yes, it will.
The way I see it is hash collision in rare case vs slow compilation in all cases. Also a hash collision will go through equals so that no 2 different entities are matched. Equals part is still in place to avoid any issue in collision case. |
I also tried out another approach though it ran into issue so definitely not a cheap fix. I wrote detailed comment about that in #18923 (comment) |
Looks very related to #19859 - I'm really not sure why we're recursing through the entire tree when calculating hash codes (as opposed to equality comparisons)... Hash collisions are completely normal, and as long as we achieve reasonable spread of keys everything should be fine (and fast)... A great example is ColumnExpression, where we recurse into the Table (which can be an arbitrarily deep subquery). I think it should be perfectly fine to only include the column name. |
Resolves #21700