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



##########
File path: go/arrow/array/float16_builder.go
##########
@@ -163,3 +168,59 @@ func (b *Float16Builder) newData() (data *Data) {
 
        return
 }
+
+func (b *Float16Builder) unmarshalOne(dec *json.Decoder) error {
+       t, err := dec.Token()
+       if err != nil {
+               return err
+       }
+
+       switch v := t.(type) {
+       case float64:
+               b.Append(float16.New(float32(v)))
+       case string:
+               f, err := strconv.ParseFloat(v, 32)
+               if err != nil {
+                       return err
+               }
+               b.Append(float16.New(float32(f)))

Review comment:
       OK, we should probably also make this clear in public docs.




-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to