fix: sql cast function when converting to float (#11817)

This commit is contained in:
mailsmail
2021-03-19 23:14:38 +07:00
committed by GitHub
parent b5dcaaccb4
commit 27eb4ae3bc
6 changed files with 43 additions and 20 deletions
+1 -1
View File
@@ -492,7 +492,7 @@ func floatCast(v *Value) (float64, error) {
switch x := v.value.(type) {
case float64:
return x, nil
case int:
case int64:
return float64(x), nil
case string:
f, err := strconv.ParseFloat(strings.TrimSpace(x), 64)