-
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: NotNullFlag is not set correctly for some expression #16954
Conversation
types/field_type.go
Outdated
// currently only NotNullFlag is checked | ||
// todo more flag need to be checked, for example: UnsignedFlag | ||
func mergeTypeFlag(a, b uint) uint { | ||
ret := a |
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.
return a & (b & mysql.NotNullFlag | ^mysql.NotNullFlag)
is ok ?
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.
Yes.
Codecov Report
@@ Coverage Diff @@
## master #16954 +/- ##
===========================================
Coverage 80.0393% 80.0393%
===========================================
Files 509 509
Lines 138868 138868
===========================================
Hits 111149 111149
Misses 18773 18773
Partials 8946 8946 |
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
/rebuild |
/rebuild |
1 similar comment
/rebuild |
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 |
cherry pick to release-2.1 in PR #16992 |
cherry pick to release-3.0 in PR #16993 |
cherry pick to release-3.1 in PR #16994 |
cherry pick to release-4.0 in PR #16995 |
What problem does this PR solve?
Problem Summary:
for some expression, the result type's NotNullFlag is not set correctly
What is changed and how it works?
Check and adjust type flag in
AggFieldType
Related changes
Check List
Tests
Side effects
Release note
case when
expression