-
Notifications
You must be signed in to change notification settings - Fork 411
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
Fix the bug that results of where <string>
is wrong because it will be converted to int type.
#3463
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
0fbfbdb
to
0ee0960
Compare
/run-all-tests |
@@ -877,7 +877,7 @@ String DAGExpressionAnalyzer::convertToUInt8(ExpressionActionsPtr & actions, con | |||
// the basic rule is: | |||
// 1. if the column is only null, just return it | |||
// 2. if the column is numeric, compare it with 0 | |||
// 3. if the column is string, convert it to numeric column, and compare with 0 | |||
// 3. if the column is string, convert it to float-point column, and compare with 0 |
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.
how does tidb/mysql solve this problem?
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.
TiDB convert the string to float
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
Note this pr can not simply be cherry-picked to other branch, since not all the version support |
there is a compatible issue in |
you'are right, so because the severity of the bug is a bit low and 4.0 does not support cast string as real push down, we will not cherry-pick it to 4.0. cc @windtalker @fuzhe1989 |
/merge |
@LittleFall: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 641698e
|
In response to a cherrypick label: new pull request created: #3476. |
In response to a cherrypick label: new pull request created: #3477. |
In response to a cherrypick label: new pull request created: #3478. |
In response to a cherrypick label: new pull request created: #3479. |
In response to a cherrypick label: new pull request created: #3480. |
What problem does this PR solve?
Issue Number: close #3447
Problem Summary:
The result of
where <string>
is wrong because it will be converted to int type.What is changed and how it works?
Proposal: xxx
What's Changed: convert it to double type to keep compatible with tidb/tikv.
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note