Skip to content

Commit

Permalink
use MayhaveNulls()
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and pitrou committed Apr 15, 2024
1 parent 168dbed commit 616a37b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/array_primitive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int64_t BooleanArray::false_count() const {
}

int64_t BooleanArray::true_count() const {
if (data_->GetNullCount() != 0) {
if (data_->MayHaveNulls()) {
DCHECK(data_->buffers[0]);
return internal::CountAndSetBits(data_->buffers[0]->data(), data_->offset,
data_->buffers[1]->data(), data_->offset,
Expand Down

0 comments on commit 616a37b

Please sign in to comment.