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

[5.0.1] Query: Don't clear projection mapping when adding single projection #23299

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

smitpatel
Copy link
Member

@smitpatel smitpatel commented Nov 13, 2020

Sometimes reclaiming memory is not the best thing to do. You never know what you will need in future.

Resolves #23266

Description

In 5.0, we cleared the projection mapping when adding single projection to SelectExpression. However, this is still needed if there are further subqueries to be translated in the projection. We don't need to clear here since this will be done by the projection translation.

Customer Impact

Regression for any query which is evaluating on client for final projection (common) and also doing FirstOrDefault (or friends) on a non-primitive type will fail with exception.

How found

Customer reported on 5.0.

Test coverage

Added test for affected scenario and existing scenario also working since clearing is happening later automatically.

Regression?

Yes, from 3.1.

Risk

Low. Defers clearing till it is actually needed and appropriate.

@ajcvickers
Copy link
Member

Approved by Tactics for 5.0.1.

Sometimes reclaiming memory is not the best thing to do. You never know what you will need in future.

Resolves #23266
@smitpatel smitpatel merged commit da1c05f into release/5.0 Nov 18, 2020
@smitpatel smitpatel deleted the smit/HitDelete branch November 18, 2020 00:59
@ajcvickers ajcvickers removed this from the 5.0.1 milestone Dec 11, 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.

3 participants