Open pg30 opened 1 month ago
Is this one being worked on? For the solution, should we try converting to string and
use big.Int
-> func (z *Int) SetString(s string, base int) (*Int, bool)
bigIntVal := new(big.Int)
if strValue, ok := value.(string); ok {
bigInt, success := bigIntVal.SetString(strValue, 10)
if !success {
return errors.New("Error: Failed to convert string to big.Int")
}
}
@pg30 Raised a PR for the fix here: https://github.com/DiceDB/dice/pull/1227 Please do have a look.
Steps to reproduce
Trying to set math.MinInt64
The result of get operation is
Expected output
Observed output
On further investigation, I observed that its happening while unmarshalling the request body in the http handler.
ParseHTTPRequest
inredisCmdAdapter.go
: we are converting the request body tomap[string]interface{}
-9.223372036854776e+18
before storing in the DB