zeroshade commented on code in PR #922:
URL: https://github.com/apache/arrow-go/pull/922#discussion_r3572941635
##########
arrow/array/struct.go:
##########
@@ -169,17 +188,19 @@ func (a *Struct) String() string {
func (a *Struct) newStructFieldWithParentValidityMask(fieldIndex int)
arrow.Array {
Review Comment:
This masking fix is correct, but the caller in `String()` still guards it
behind `!bytes.Equal(structBitmap, v.NullBitmapBytes())` (around L171). When a
sliced child's bitmap **bytes** happen to equal the parent's but their physical
**offsets** differ, masking is skipped and `Struct.String()` can print a value
where the parent struct is null. Please fold offset compatibility into that
shortcut (e.g. also apply the mask when `a.Offset() != v.Data().Offset()`), and
add a regression test where the bitmap bytes are identical but the offsets
differ.
--
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]