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

util/types: add test for datum eval function #3795

Merged
merged 2 commits into from Jul 20, 2017

Conversation

Projects
None yet
4 participants
@tiancaiamao
Contributor

tiancaiamao commented Jul 18, 2017

Improve file datum_test.go test coverage to 93.6%

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Jul 19, 2017

Member

LGTM
@XuHuaiyu PTAL

Member

shenli commented Jul 19, 2017

LGTM
@XuHuaiyu PTAL

{NewUintDatum(72), NewIntDatum(28), NewUintDatum(100), NewUintDatum(44), false},
{NewFloat64Datum(72.0), NewFloat64Datum(28.0), NewFloat64Datum(100.0), NewFloat64Datum(44.0), false},
{NewDecimalDatum(NewDecFromStringForTest("72.5")), NewDecimalDatum(NewDecFromInt(3)), NewDecimalDatum(NewDecFromStringForTest("75.5")), NewDecimalDatum(NewDecFromStringForTest("69.5")), false},
{NewIntDatum(72), NewFloat64Datum(42), Datum{}, Datum{}, true},

This comment has been minimized.

@XuHuaiyu

XuHuaiyu Jul 19, 2017

Contributor

what error do we get here?

@XuHuaiyu

XuHuaiyu Jul 19, 2017

Contributor

what error do we get here?

This comment has been minimized.

@tiancaiamao

tiancaiamao Jul 19, 2017

Contributor

Invalid operation: %v %v %v (mismatched types %T and %T)
ComputePlus and ComputeMinus don't handle different types except int/uint, and don't cast input to decimal.

@tiancaiamao

tiancaiamao Jul 19, 2017

Contributor

Invalid operation: %v %v %v (mismatched types %T and %T)
ComputePlus and ComputeMinus don't handle different types except int/uint, and don't cast input to decimal.

@XuHuaiyu

This comment has been minimized.

Show comment
Hide comment
@XuHuaiyu

XuHuaiyu Jul 20, 2017

Contributor

LGTM

Contributor

XuHuaiyu commented Jul 20, 2017

LGTM

@hanfei1991 hanfei1991 merged commit 26f307a into master Jul 20, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@hanfei1991 hanfei1991 deleted the tiancaiamao/datum-test branch Jul 20, 2017

dbjoa added a commit to cloud-pi/tidb that referenced this pull request Jul 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment