Adding support for any collection in ExpressionEqualityComparer #37212#37250
Adding support for any collection in ExpressionEqualityComparer #37212#37250roji merged 1 commit intodotnet:mainfrom
Conversation
249ae47 to
6b86657
Compare
|
@kirolous-nashaat thanks for submitting and sorry it took so long to review.
|
roji
left a comment
There was a problem hiding this comment.
I've looked at this, and #37684 presents some difficulties. It's also not really necessary to do it before this - the current behavior of having query cache misses - and the resulting constant query recompilation - is likely to be far worse than the enumeration here.
Note that parameterized lists/collections/enumerables isn't a problem, as these get extracted out beforehand by the funcletizer. So this likely affects a very small minority of scenarios in any case.
So I'm pushing a few style tweaks and will merge, thanks for your contribution!
Extend
GetHashCodeto handleIEnumerableobjects, ensuring proper hash code generation for collections.Add support for comparing
IEnumerableobjects usingSequenceEqual, enhancing robustness for constant value comparisons.Closes #37212
Tests for the changes have been added (for bug fixes / features)Existing test already cover this, removed the old workaround for ignore query filters