You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/12 06:31:09 UTC

[GitHub] [arrow] cyb70289 commented on a diff in pull request #14088: ARROW-17670: [Go] Implement Filter function for Primitive and FixedSize types

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org