Skip to content

Commit dde1b5f

Browse files
committed
Fix float to bigint conversion result
1 parent c5f7d51 commit dde1b5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/types/number.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ func convertToInt64(t NumberTypeImpl_, v interface{}) (int64, sql.ConvertInRange
969969
} else if v < float32(math.MinInt64) {
970970
return math.MinInt64, sql.OutOfRange, nil
971971
}
972-
return int64(math.Round(float64(v))), sql.OutOfRange, nil
972+
return int64(math.Round(float64(v))), sql.InRange, nil
973973
case float64:
974974
if v > float64(math.MaxInt64) {
975975
return math.MaxInt64, sql.OutOfRange, nil

0 commit comments

Comments
 (0)