cyb70289 commented on code in PR #14088:
URL: https://github.com/apache/arrow/pull/14088#discussion_r968027079


##########
go/arrow/compute/internal/exec/span.go:
##########
@@ -85,16 +86,20 @@ type ArraySpan struct {
        Children []ArraySpan
 }
 
+func (a *ArraySpan) MayHaveNulls() bool {
+       return atomic.LoadInt64(&a.Nulls) != 0 && a.Buffers[0].Buf != nil
+}
+
 // UpdateNullCount will count the bits in the null bitmap and update the
 // number of nulls if the current null count is unknown, otherwise it just
 // returns the value of a.Nulls
 func (a *ArraySpan) UpdateNullCount() int64 {
        if a.Nulls != array.UnknownNullCount {

Review Comment:
   Should this loading of  `a.Nulls` also be atomic to prevent data race?



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