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
expression: remove the usage of "TypeClass" in "expression.go" #4571
Conversation
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
to #4394