zeroshade commented on a change in pull request #11359:
URL: https://github.com/apache/arrow/pull/11359#discussion_r744295827



##########
File path: go/arrow/array/decimal128.go
##########
@@ -229,6 +253,67 @@ func (b *Decimal128Builder) newData() (data *Data) {
        return
 }
 
+func (b *Decimal128Builder) unmarshalOne(dec *json.Decoder) error {
+       t, err := dec.Token()
+       if err != nil {
+               return err
+       }
+
+       var out *big.Float
+
+       switch v := t.(type) {
+       case float64:
+               out = big.NewFloat(v)
+       case string:
+               out, _, err = big.ParseFloat(v, 10, 0, big.ToNearestAway)
+               if err != nil {
+                       return err
+               }
+       case json.Number:

Review comment:
       good point, i've updated the `json.Number` case to work the same as the 
`string` case and fixed the precision to be 128




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to