-
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: fix a bug when comparing bit with string (#11654) #11660
Conversation
/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
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-unit-test |
/run-all-tests |
@sre-bot merge failed. |
/run-auto-merge |
/run-all-tests |
@sre-bot merge failed. |
/run-unit-test |
/run-auto-merge |
/run-all-tests |
cherry-pick #11654 to release-3.0
What problem does this PR solve?
Issue: #11647
When a bit column compare with a constant string, it gets a wrong result.
Befor the pr:
This pr:
What is changed and how it works?
The reason is that we select a wrong target field type in function
RefineComparedConstant
.Before this pr, the target field is
TypeBit
, and convert '1' to 49.In fact, the target field shoule be an int type in this situation, and convert '1' to 1.
In this pr, I change the target field to
TypeLonglong
.Check List
Tests
Code changes
Side effects
Related changes