You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "sqd (via GitHub)" <gi...@apache.org> on 2026/04/15 20:10:50 UTC
[PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
sqd opened a new pull request, #9733:
URL: https://github.com/apache/arrow-rs/pull/9733
Currently RecordBatch::normalize() has a bug in that the top level struct's null bitmap is not propagated into the resulting normalized arrays' null bitmap. In other words, a child element may suddenly appear non-null, losing the fact that the parent level struct is null at that index. See the test in this change for a bug reproduction.
This change fixes that behavior. Also adds StructArray::flatten() which mirrors arrow-cpp's semantics and handles the aforementioned behavior correctly. The fixed RecordBatch::normalize() now uses StructArray::flatten() under the hood.
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax.
-->
- Closes #9732.
# Are these changes tested?
Yes
# Are there any user-facing changes?
No
--
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
Re: [PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #9733:
URL: https://github.com/apache/arrow-rs/pull/9733#issuecomment-4297130305
Thanks @sqd -- I will merge this PR. Sorry for the delay
--
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
Re: [PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
Posted by "sqd (via GitHub)" <gi...@apache.org>.
sqd commented on PR #9733:
URL: https://github.com/apache/arrow-rs/pull/9733#issuecomment-4276291768
Thank you @ngli-me ! This is ready for another look @alamb
--
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
Re: [PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
Posted by "sqd (via GitHub)" <gi...@apache.org>.
sqd commented on PR #9733:
URL: https://github.com/apache/arrow-rs/pull/9733#issuecomment-4255173166
The C++ function: https://arrow.apache.org/docs/cpp/api/array.html#_CPPv4NK5arrow11StructArray7FlattenEP10MemoryPool
--
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
Re: [PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #9733:
URL: https://github.com/apache/arrow-rs/pull/9733
--
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
Re: [PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
Posted by "sqd (via GitHub)" <gi...@apache.org>.
sqd commented on PR #9733:
URL: https://github.com/apache/arrow-rs/pull/9733#issuecomment-4283963960
Thank you @alamb ! I am very new to this repo so not sure what the process is, but feel free to merge whenever, or let me know what else is needed.
--
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
Re: [PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #9733:
URL: https://github.com/apache/arrow-rs/pull/9733#issuecomment-4255374551
@negli-me, since you added the normalize function, could you help review this PR
It was added in
- #6758
--
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
Re: [PR] Fix RecordBatch::normalize() null bitmap bug and add StructArray::flatten() [arrow-rs]
Posted by "sqd (via GitHub)" <gi...@apache.org>.
sqd commented on PR #9733:
URL: https://github.com/apache/arrow-rs/pull/9733#issuecomment-4274676033
I think this is the correct github handle, without "e" @ngli-me
--
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