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


##########
go/arrow/array/string.go:
##########
@@ -246,7 +249,7 @@ func (a *LargeString) setData(data *Data) {
 
        if vdata := data.buffers[2]; vdata != nil {
                b := vdata.Bytes()
-               a.values = *(*string)(unsafe.Pointer(&b))
+               a.values = string(b[:])

Review Comment:
   we shouldn't copy the entire buffer here. Keep the `unsafe.Pointer` here so 
we only perform copies in the `Value` method and only on the values that are 
requested.



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