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: remove the usage of "TypeClass" in "expression.go" #4571

Merged
merged 5 commits into from Sep 21, 2017

Conversation

Projects
None yet
5 participants
@zz-jason
Member

zz-jason commented Sep 19, 2017

to #4394

@sre-bot

This comment has been minimized.

Show comment
Hide comment
@sre-bot

sre-bot Sep 19, 2017

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

sre-bot commented Sep 19, 2017

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

zz-jason added some commits Sep 19, 2017

@@ -218,7 +218,8 @@ func evalExprToString(expr Expression, row []types.Datum, _ *variable.StatementC
if val.IsNull() || err != nil {
return res, val.IsNull(), errors.Trace(err)
}
if expr.GetTypeClass() == types.ClassString || IsHybridType(expr) {
exprEvalTp := fieldTp2EvalTp(expr.GetType())
if exprEvalTp == tpString || exprEvalTp == tpJSON || IsHybridType(expr) {

This comment has been minimized.

@XuHuaiyu

XuHuaiyu Sep 20, 2017

Contributor

why not check tpDatetime, tpTimestamp here?

@XuHuaiyu

XuHuaiyu Sep 20, 2017

Contributor

why not check tpDatetime, tpTimestamp here?

This comment has been minimized.

@zz-jason

zz-jason Sep 21, 2017

Member

it should be checked in evalTime

@zz-jason

zz-jason Sep 21, 2017

Member

it should be checked in evalTime

@hanfei1991

This comment has been minimized.

Show comment
Hide comment
@hanfei1991

hanfei1991 Sep 21, 2017

Member

LGTM

Member

hanfei1991 commented Sep 21, 2017

LGTM

@coocood

LGTM

@coocood coocood added status/LGT2 and removed status/LGT1 labels Sep 21, 2017

@hanfei1991 hanfei1991 merged commit a12306c into master Sep 21, 2017

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 72.43%
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@hanfei1991 hanfei1991 deleted the zz-jason/remove/typeclass/expression/expression branch Sep 21, 2017

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