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

View File

@@ -127,10 +127,10 @@ func parseLimit(v *LitValue) (int64, error) {
switch {
case v == nil:
return -1, nil
case v.Number == nil:
case v.Int == nil:
return -1, errBadLimitSpecified
default:
r := int64(*v.Number)
r := int64(*v.Int)
if r < 0 {
return -1, errBadLimitSpecified
}