From 432e18d5718ddc075187483ccb5b251bf7290c4a Mon Sep 17 00:00:00 2001 From: Travis Date: Wed, 22 Apr 2020 19:11:03 -0500 Subject: [PATCH] return early on mantissa=0 --- pql/decimal.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pql/decimal.go b/pql/decimal.go index 68c2704f4..c6a7f834c 100644 --- a/pql/decimal.go +++ b/pql/decimal.go @@ -451,6 +451,7 @@ func reducePrecision(sign bool, mantissa []byte, scale int64) ([]byte, int64, bo // string, that means it's value should be 0. if len(mantissa) == 0 { mantissa = []byte{'0'} + return mantissa, scale, true } lenMantissa := len(mantissa)