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

[3.1] Fix to #12729 - Flatten Case expression #20362

Merged
merged 1 commit into from
Apr 4, 2020
Merged

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Mar 20, 2020

Description

  • Added CaseWhenFlatteningExpressionVisitor postprocessor
  • Recursively collapse relevant CaseExpression

Customer Impact
Invalid sql generated for query with multi level conditional expression. Some scenarios can work around the problem by rewriting the queries, but when the case statements are generated (e.g. in some OData scenarios) we don't have a good workaround.

How found
Reported by multiple customers.

Test coverage
We have added test to cover this scenario.

Regression?
No.

Risk
Low. Fix is very isolated and the logic the fix employs is straightforward. Quirk added to further mitigate the risk.

@maumar maumar requested a review from ajcvickers March 20, 2020 20:36
@maumar maumar added this to the 3.1.x milestone Mar 20, 2020
@bricelam bricelam changed the base branch from release/3.1.4 to release/3.1 March 30, 2020 18:35
Summary of the changes
- Added CaseWhenFlatteningExpressionVisitor postprocessor
- Recursively collapse relevant CaseExpression
@ajcvickers ajcvickers merged commit caf5f07 into release/3.1 Apr 4, 2020
@ajcvickers ajcvickers deleted the fix12729_31 branch April 4, 2020 20:14
@ajcvickers ajcvickers modified the milestones: 3.1.x, 3.1.4 Apr 4, 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