zeroshade commented on code in PR #35723:
URL: https://github.com/apache/arrow/pull/35723#discussion_r1213378708
##########
go/arrow/array/string.go:
##########
@@ -221,16 +217,12 @@ func (a *LargeString) ValueOffsets() []int64 {
return a.offsets[beg:end]
}
-func (a *LargeString) ValueBytes() (ret []byte) {
+func (a *LargeString) ValueBytes() []byte {
beg := a.array.data.offset
end := beg + a.array.data.length
data := a.values[a.offsets[beg]:a.offsets[end]]
- s := (*reflect.SliceHeader)(unsafe.Pointer(&ret))
- s.Data = (*reflect.StringHeader)(unsafe.Pointer(&data)).Data
- s.Len = len(data)
- s.Cap = len(data)
- return
+ return []byte(data)
Review Comment:
This still needs to get updated to no longer be copying the string (like the
equivalent function for `(*String)`
--
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]