Commits


Alenka Frim authored and GitHub committed e4baf6be216
GH-38553 : [C++] Replace null_count with MayHaveNulls in ListArrayFromArray and MapArray (#41957) ### Rationale for this change Offsets could have `null_count() == -1` (`kUnknownNullCount`) meaning that offsets might contain nulls that are not accounted for which can produce failures (https://github.com/apache/arrow/issues/38553) when working with `ListArray` or `MapArray`. `null_count()` should be replaced with `MayHaveNulls()`. ### What changes are included in this PR? `null_count` is replaced with `MayHaveNulls` in `ListArrayFromArray`, `MapArray::FromArraysInternal` and `MapArray::ValidateChildData`. Some tests had to be updated. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #38553 Authored-by: AlenkaF <frim.alenka@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>