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: Assign datetime typemapping to DateTimeOffset.Date #19865

Merged
merged 2 commits into from
Feb 14, 2020

Conversation

smitpatel
Copy link
Member

@smitpatel smitpatel commented Feb 10, 2020

Resolves #19052

Description

When DateTimeOffset.Date is translated, we kept resulting type mapping as datetimeoffset so during comparison with other date, the parameter is created using wrong store type.

Customer Impact

Due to parameter type being wrong, it can have offset sometimes giving incorrect results of the query.

How found

Reported by multiple customers.

Test coverage

We did not have test coverage for specific scenario where DateTimeOffset.Date's type mapping mattered. This has been added.

Regression?

Possibly. We have verified the exact behavior in 2.x because a lot has changed in how we translate this, but it's likely this was broken in 2.x at least for some cases.

Risk

Low. Affects only translation of DateTimeOffset.Date which was incorrect before this fix.

Also, fix is on by default, but quirk switch is present to revert back to old behavior.

@smitpatel smitpatel changed the title Query: Assign datetime typemapping to DateTimeOffset.Date [release/3.1\ Query: Assign datetime typemapping to DateTimeOffset.Date Feb 10, 2020
@smitpatel smitpatel changed the title [release/3.1\ Query: Assign datetime typemapping to DateTimeOffset.Date [release/3.1] Query: Assign datetime typemapping to DateTimeOffset.Date Feb 10, 2020
@ajcvickers ajcvickers added this to the 3.1.x milestone Feb 11, 2020
@leecow leecow modified the milestones: 3.1.x, 3.1.3 Feb 11, 2020
@ajcvickers
Copy link
Member

@smitpatel Approved by Tactics and branches are open; let's try to get this merged today.

@smitpatel smitpatel merged commit 56411a7 into release/3.1 Feb 14, 2020
@smitpatel smitpatel deleted the smit/patch19052 branch February 14, 2020 22:57
@ajcvickers ajcvickers removed this from the 3.1.3 milestone Feb 15, 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.

None yet

3 participants