-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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,plan: fix some issues of ROUND func #2461
Conversation
case "round": | ||
t := x.Args[0].GetType().Tp | ||
switch t { | ||
case mysql.TypeBit, mysql.TypeTiny, mysql.TypeShort, mysql.TypeInt24, mysql.TypeLonglong: |
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.
Should decimal be counted as Exact Value ? @coocood
@@ -325,9 +325,17 @@ func dumpTextValue(mysqlType uint8, value types.Datum) ([]byte, error) { | |||
case types.KindUint64: | |||
return strconv.AppendUint(nil, value.GetUint64(), 10), nil | |||
case types.KindFloat32: | |||
return strconv.AppendFloat(nil, value.GetFloat64(), 'f', -1, 32), nil | |||
prec := -1 |
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.
Any tests cover this function?
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.
@tiancaiamao I've added some tests, PTAL.
LGTM |
@zyguan |
LGTM |
I'm not very sure if I shall update the following codes also.