mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
fix: sql cast function when converting to float (#11817)
This commit is contained in:
@@ -306,15 +306,6 @@ func (v Value) CSVString() string {
|
||||
}
|
||||
}
|
||||
|
||||
// floatToValue converts a float into int representation if needed.
|
||||
func floatToValue(f float64) *Value {
|
||||
intPart, fracPart := math.Modf(f)
|
||||
if fracPart == 0 && intPart < math.MaxInt64 && intPart > math.MinInt64 {
|
||||
return FromInt(int64(intPart))
|
||||
}
|
||||
return FromFloat(f)
|
||||
}
|
||||
|
||||
// negate negates a numeric value
|
||||
func (v *Value) negate() {
|
||||
switch x := v.value.(type) {
|
||||
|
||||
Reference in New Issue
Block a user