zeroshade commented on code in PR #34585:
URL: https://github.com/apache/arrow/pull/34585#discussion_r1143488837


##########
go/arrow/csv/reader.go:
##########
@@ -773,6 +778,18 @@ func (r *Reader) parseBinaryType(field array.Builder, str 
string) {
        field.(*array.BinaryBuilder).Append(decodedVal)
 }
 
+func (r *Reader) parseExtension(field array.Builder, str string) {
+       if r.isNull(str) {
+               field.AppendNull()
+               return
+       }
+       dec := json.NewDecoder(strings.NewReader(`"` + str + `"`))

Review Comment:
   the raw value will be a string, but for example "3" would decode to the 
string "3" while the underlying storage or the custom unmarshalling may expect 
the number `3` instead. Essentially my objection here is the explicit addition 
of quotes and explicitly requiring JSON decoding. Also, if we're going to go 
this direction, we should at least use `strconv.Quote` instead :smile:



-- 
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