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

This commit is contained in:
mailsmail authored and GitHub committed 2021-03-19 09:14:38 -07:00
1 parent b5dcaaccb4
commit 27eb4ae3bc
6 files changed
+43 -20

No files matched your search

+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)