-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: avoid unnecessary warnings/errors when folding constants in control expr #19675
Conversation
/run-check_dev_2 |
/run-check_dev_2 |
1 similar comment
/run-check_dev_2 |
4e4b6d3
to
64fc856
Compare
64fc856
to
9c3f2f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@fzhedu merge failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #19910 |
What problem does this PR solve?
Issue Number: close #17725
following #19367, avoid unnecessary warnings/errors when folding constants in control expr.
Problem Summary:
What is changed and how it works?
Proposal: xxx
What's Changed:
the scalar
if
is wrong, to be corrected here,add
tryFoldCounter
to try fold constrants but not throw warnings/erros.correct the special handler for control expressions.
How it Works:
each branch of control expressions fold contrants whenever possible, but not throw uncessary warnings/errors. When folding the control expressions, it run the normal branches and return normally like evaluating scalar expressions. If a branch is not const, it will stop folding constrants.
Related changes
Check List
Tests
Release note