Skip to content
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 the bug that castStringAsReal has different behaivor between tiflash and tikv/tidb. #3681

Merged
merged 4 commits into from
Dec 28, 2021

Conversation

LittleFall
Copy link
Contributor

@LittleFall LittleFall commented Dec 17, 2021

What problem does this PR solve?

Issue Number: close #3475, related to #3447

Problem Summary: Fix the bug that castStringAsReal has different behaivor between tiflash and tikv/tidb.

What is changed and how it works?

truncate string, instead of passing it all to strtod.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Fix the issue that `castStringAsReal` behavior is inconsistent in TiFlash and in TiDB/TiKV

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 17, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • windtalker

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 17, 2021
@LittleFall LittleFall changed the title fix expression: Fix the bug that castStringAsReal has different behaivor between tiflash and tikv/tidb. Dec 17, 2021
@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Dec 17, 2021
@LittleFall LittleFall requested a review from fuzhe1989 December 19, 2021 17:12
@LittleFall LittleFall added needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 needs-cherry-pick-release-5.0 PR which needs to be cherry-picked to release-5.0 needs-cherry-pick-release-5.1 PR which needs to be cherry-picked to release-5.1 needs-cherry-pick-release-5.2 PR which needs to be cherry-picked to release-5.2 needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 and removed affects-4.0 affects-5.0 affects-5.1 affects-5.2 affects-5.3 labels Dec 19, 2021
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 20, 2021
@LittleFall
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@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 /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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.

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 21, 2021
@sre-bot
Copy link
Collaborator

sre-bot commented Dec 21, 2021

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/524/cobertura/
(Coverage detail url is limited office network access)

lines: 42.5% (47535 out of 111818)
branches: 6.0% (73028 out of 1208729)

@windtalker
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@windtalker: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 183d9d1

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 28, 2021
@sre-bot
Copy link
Collaborator

sre-bot commented Dec 28, 2021

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/653/cobertura/
(Coverage detail url is limited office network access)

lines: 42.8% (48253 out of 112716)
branches: 6.2% (74663 out of 1213055)

@ti-chi-bot ti-chi-bot merged commit 71ef265 into pingcap:master Dec 28, 2021
ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Dec 28, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3753.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3754.

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Dec 28, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3755.

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Dec 28, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3756.

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Dec 28, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3757.

@LittleFall LittleFall deleted the bugfix/3475 branch January 26, 2022 06:11
ti-chi-bot added a commit that referenced this pull request Jan 26, 2022
ti-chi-bot added a commit that referenced this pull request Apr 15, 2022
@JaySon-Huang JaySon-Huang added the type/bugfix This PR fixes a bug. label Apr 20, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Apr 20, 2022

lines: 42.4% (48240 out of 113815)
branches: 6.1% (74648 out of 1214585)

LittleFall added a commit that referenced this pull request Jun 17, 2022
…between tiflash and tikv/tidb. (#3681) (#3754)

* fix

* update test

Co-authored-by: Zhi Qi <qizhi@pingcap.com>
ti-chi-bot added a commit that referenced this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 needs-cherry-pick-release-5.0 PR which needs to be cherry-picked to release-5.0 needs-cherry-pick-release-5.1 PR which needs to be cherry-picked to release-5.1 needs-cherry-pick-release-5.2 PR which needs to be cherry-picked to release-5.2 needs-cherry-pick-release-5.3 Type: Need cherry pick to release-5.3 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cast string as real has different behaivor between tiflash and tikv/tidb.
5 participants