zeroshade commented on code in PR #34585:
URL: https://github.com/apache/arrow/pull/34585#discussion_r1145313995
##########
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:
I like the idea of `AppendFromText` because that could remove the need for
the separate parse methods here. You'd just need to first check `r.isNull(str)`
before you could hand it off to the `AppendFromText` and have that return an
`error` so it can error if it fails to parse the value. I like it. For the time
being I think it's fine to leave the JSON style extension handling here for now
and make that improvement as a separate PR.
--
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]