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


##########
go/arrow/array/fixedsize_binarybuilder.go:
##########
@@ -81,6 +83,12 @@ func (b *FixedSizeBinaryBuilder) AppendNull() {
        b.UnsafeAppendBoolToBitmap(false)
 }
 
+func (b *FixedSizeBinaryBuilder) AppendEmptyValue() {
+       b.Reserve(1)
+       b.values.Advance(b.dtype.ByteWidth)

Review Comment:
   @pitrou There's no undefined values in Go, everything is defaulted to a 
`zero` value based on the type. For `byte` it's 0. So by just advancing the 
underlying buffer it automatically zeroes out the memory. Since this is for 
FixedSizeBinary, it needs to get advanced like this (the C++ version of this 
just explicitly zeroes out the memory which, as I said, isn't needed in Go)



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