Skip to content

GH-38553 : [C++] Replace null_count with MayHaveNulls in ListArrayFromArray and MapArray - #41957

Merged
felipecrv merged 1 commit into
apache:mainfrom
AlenkaF:gh-38553-use-may-have-nulls
Jun 4, 2024
Merged

GH-38553 : [C++] Replace null_count with MayHaveNulls in ListArrayFromArray and MapArray#41957
felipecrv merged 1 commit into
apache:mainfrom
AlenkaF:gh-38553-use-may-have-nulls

Conversation

@AlenkaF

@AlenkaFAlenkaF commented Jun 4, 2024

Copy link
Copy Markdown
Member

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 (#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.

@felipecrv
felipecrv merged commit e4baf6b into apache:mainJun 4, 2024
@felipecrvfelipecrv removed the awaiting review Awaiting review label Jun 4, 2024
@github-actionsgithub-actionsBot added the awaiting merge Awaiting merge label Jun 4, 2024
@felipecrv

Copy link
Copy Markdown
Contributor

Thank you @AlenkaF!

@AlenkaF
AlenkaF deleted the gh-38553-use-may-have-nulls branch June 5, 2024 06:37
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit e4baf6b.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 11 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@AlenkaF@felipecrv