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

tidb_query: fix RealPlus overflow inconsistent with tidb #6458

Merged
merged 2 commits into from Jan 10, 2020

Conversation

@lonng
Copy link
Member

lonng commented Jan 10, 2020

Signed-off-by: Lonng heng@lonng.org

What have you changed?

The logic of handling overflow while plus two real number inconsistent with TiDB, this PR tries to fix it. See: https://github.com/pingcap/tidb/blob/master/expression/builtin_arithmetic.go#L288:L288

What is the type of the changes?

  • Bugfix (a change which fixes an issue)

How is the PR tested?

  • Unit test
Signed-off-by: Lonng <heng@lonng.org>
@lonng

This comment has been minimized.

Copy link
Member Author

lonng commented Jan 10, 2020

/run-all-tests

@lonng

This comment has been minimized.

Copy link
Member Author

lonng commented Jan 10, 2020

/test

1 similar comment
@lonng

This comment has been minimized.

Copy link
Member Author

lonng commented Jan 10, 2020

/test

Copy link
Contributor

mapleFU left a comment

LGTM, how about:

(
                Real::new(std::f64::MAX - 3f64).ok(),
                Real::new(2f64).ok(),
                ...
            ),

Maybe testing this is better?

@lonng

This comment has been minimized.

Copy link
Member Author

lonng commented Jan 10, 2020

/merge

@sre-bot sre-bot added the S: CanMerge label Jan 10, 2020
@sre-bot

This comment has been minimized.

Copy link
Collaborator

sre-bot commented Jan 10, 2020

/run-all-tests

@sre-bot

This comment has been minimized.

Copy link
Collaborator

sre-bot commented Jan 10, 2020

@lonng merge failed.

@lonng

This comment has been minimized.

Copy link
Member Author

lonng commented Jan 10, 2020

/test

@lonng lonng merged commit 4843f63 into tikv:master Jan 10, 2020
6 checks passed
6 checks passed
DCO All commits are signed off!
Details
idc-jenkins-ci-tikv/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-copr-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details
@lonng lonng deleted the lonng:fix-plus-real branch Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.