-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: add not null flag in PB when constant not null #14912
expression: add not null flag in PB when constant not null #14912
Conversation
/run-all-tests |
return nil | ||
} | ||
if !x.Value.IsNull() { | ||
pbExpr.FieldType.Flag |= uint32(mysql.NotNullFlag) |
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.
Is it better to put these code into Constant.GetType
?
Codecov Report
@@ Coverage Diff @@
## master #14912 +/- ##
===========================================
Coverage 80.5274% 80.5274%
===========================================
Files 502 502
Lines 132761 132761
===========================================
Hits 106909 106909
Misses 17492 17492
Partials 8360 8360 |
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
/run-all-tests |
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
/run-all-tests |
@lzmhhh123 merge failed. |
/run-all-tests |
fc5d679
to
2f628f7
Compare
/run-all-tests |
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 |
What problem does this PR solve?
As the title says. We didn't set the not null flag for constant expression.
What is changed and how it works?
Check whether the constant is null and set the not null flag.
Check List
Tests
Side effects
Related changes