Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-41016: [C++] Fix null count check in BooleanArray.true_count…
…() (apache#41070) ### Rationale for this change Loading the `null_count` attribute doesn't take into account the possible value of -1, leading to a code path where the validity buffer is accessed, but which is not necessarily present in that case. ### What changes are included in this PR? Use `data->MayHaveNulls()` instead of `data->null_count.load()` ### Are these changes tested? Yes * GitHub Issue: apache#41016 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
- Loading branch information