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

Merged
merged 5 commits into from Sep 21, 2017

Conversation

zz-jason
Copy link
Member

to #4394

@sre-bot
Copy link
Contributor

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.

@@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not check tpDatetime, tpTimestamp here?

Copy link
Member Author

Choose a reason for hiding this comment

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

it should be checked in evalTime

@hanfei1991
Copy link
Member

LGTM

@hanfei1991 hanfei1991 added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 21, 2017
Copy link
Member

@coocood coocood left a comment

Choose a reason for hiding this comment

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

LGTM

@coocood coocood added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 21, 2017
@hanfei1991 hanfei1991 merged commit a12306c into master Sep 21, 2017
@hanfei1991 hanfei1991 deleted the zz-jason/remove/typeclass/expression/expression branch September 21, 2017 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants