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

[release/3.1] Query: Match memberInfo in hierarchy for reducing MemberInitExpression #20047

Merged
merged 2 commits into from
Feb 25, 2020

Conversation

smitpatel
Copy link
Member

Description
Issue: For compiler generated trees the MemberInfos always in sync. But for manually generated trees, if derived type parameter is used then the MemberInfo.ReflectedType is different. Which throws off ReplacingExpressionVisitor when comparing MemberInfo.
Fix: Use helper method IsSameAs which compare memberInfos which refer to same member access in given hierarchy

Resolves #19087

Customer Impact
In dynamic query generation if hierarchies are involved then it could throw translation failure error. It is hard to figure out the root cause for such cases.

How found
Multiple customer reported.

Test coverage
We have added test to cover this scenario.

Regression?
Yes, from 2.x

Risk
Low.

Issue: For compiler generated trees the MemberInfos always in sync. But for manually generated trees, if derived type parameter is used then the MemberInfo.ReflectedType is different. Which throws off ReplacingExpressionVisitor when comparing MemberInfo.
Fix: Use helper method IsSameAs which compare memberInfos which refer to same member access in given hierarchy

Resolves #19087
@smitpatel smitpatel added this to the 3.1.x milestone Feb 24, 2020
@smitpatel smitpatel changed the title Query: Match memberInfo in hierarchy for reducing MemberInitExpression [release/3.1] Query: Match memberInfo in hierarchy for reducing MemberInitExpression Feb 25, 2020
@leecow leecow modified the milestones: 3.1.x, 3.1.4 Feb 25, 2020
@ajcvickers
Copy link
Member

@smitpatel Quirk?

@smitpatel smitpatel merged commit 97936e8 into release/3.1 Feb 25, 2020
@smitpatel smitpatel deleted the smit/patch19087 branch February 25, 2020 19:58
@wtgodbe
Copy link
Member

wtgodbe commented Feb 26, 2020

@smitpatel in the future please do not merge anything into release branches without confirmation that branches are open - this is for 3.1.4, which is shipping in May, but we currently are still working on 3.1.3 which ships in March. Merging early can risk resetting an in-progress build

@smitpatel smitpatel removed this from the 3.1.4 milestone Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants