aaron-seq commented on PR #50546:
URL: https://github.com/apache/arrow/pull/50546#issuecomment-5074642554

   Thanks for the review! Pushed a follow-up commit addressing all three points:
   
   CountAndSetBits: replaced the manual BinaryBitBlockCounter/NextAndNotWord 
loop with CountSetBits(parent) - CountAndSetBits(parent, child) for the case 
where both parent and child have validity bitmaps.
   No-bitmap child (NullType/REE/Union): dropped the per-element logical-null 
check and now conservatively reject whenever the child reports any nulls and 
has no validity buffer of its own consistent with the bitmap-only semantics 
used in the main path, rather than mixing in logical-null reasoning.
   Non-nullable field output: the cast result for a non-nullable field now has 
its validity buffer stripped before being attached to the parent. Previously 
the masked-but-physically-null bits from the source could survive into the 
output, which would surface as real nulls if that field were later extracted on 
its own (e.g. struct_field/flatten) thanks for catching that, it was the one 
actual correctness gap left.
   Also added a regression test for the no-bitmap-child path (the existing 
"AbsentChild" test didn't actually exercise it, so I renamed it to reflect what 
it covers and added a new one), and fixed a couple of lint nits (an overlong 
line, a missing blank line in the Python test).


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to