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

expression: fix a bug that DML using caseWhen may cause schema change #20095

Merged
merged 4 commits into from
Sep 19, 2020

Conversation

wjhuang2016
Copy link
Member

Signed-off-by: wjhuang2016 huangwenjun1997@gmail.com

What problem does this PR solve?

Issue Number: close #19387

Problem Summary:

  1. BuildCastFunction(expr.GetCtx(), foldedExpr, foldedExpr.GetType()) in constant_fold.go in wrong and needless.
    foldedExpr.GetType() should be expr.GetType().

What is changed and how it works?

  1. Remove BuildCastFunction(expr.GetCtx(), foldedExpr, foldedExpr.GetType()).

Related changes

Check List

Tests

  • Unit test

Side effects

Release note

  • fix a bug that DML using caseWhen may cause schema change

@wjhuang2016 wjhuang2016 requested review from a team as code owners September 18, 2020 07:47
@wjhuang2016 wjhuang2016 requested review from SunRunAway and removed request for a team September 18, 2020 07:47
@wjhuang2016 wjhuang2016 changed the base branch from master to release-4.0 September 18, 2020 07:47
1
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
@wjhuang2016 wjhuang2016 added this to the 4.0.7 milestone Sep 18, 2020
@coocood
Copy link
Member

coocood commented Sep 18, 2020

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 18, 2020
@ti-challenge-bot
Copy link

There is no reward for this challenge pull request, so you can request a reward from @SunRunAway.

More

Tip : About reward you can refs to reward-command.

Warning: None

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot
Copy link
Contributor

@eurekaka,Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments.See the corresponding SIG page for more information. Related SIG: execution(slack).

@ti-challenge-bot
Copy link

There is no reward for this challenge pull request, so you can request a reward from @SunRunAway.

More

Tip : About reward you can refs to reward-command.

Warning: None

@eurekaka eurekaka added the status/can-merge Indicates a PR has been approved by a committer. label Sep 18, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@wjhuang2016 merge failed.

@bb7133
Copy link
Member

bb7133 commented Sep 19, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

select sum(case when 1 then a end) from t group by a causes schema change
5 participants