sgilmore10 opened a new pull request, #36114:
URL: https://github.com/apache/arrow/pull/36114

   > **Warning**
   This pull request is dependent on #36108. Once that one is merged, we'll 
rebase this PR and mark it as ready for review.
   
   ### Rationale for this change
   
   We want to take advantage of the validity bitmap optimization in which it's 
stored a nullptr if everything in the array is valid. When making large arrow 
arrays with only valid elements, this speeds up construction because we don't 
have to bit-pack the the validity array. 
   
   ### What changes are included in this PR?
   
   1. Renamed `bit_pack_matlab_logical_array` to `pack`. This function lives in 
the `arrow::matlab::bit` namespace.
   2. Renamed `bit_unpack_arrow_buffer` to `unpack`. This function lives in the 
`arrow::matlab::bit` namespace.
   3. Added a new function called `packValid`, which returns a `nullptr` if the 
input MATLAB logical array that represents the valid elements is empty. 
   4. Modified `arrow.args.parseValidElements` to return a 0x1 logical array if 
all the elements in the MATLAB array are valid.
   
   
   ### Are these changes tested?
   Yes. 
   
   1. Added tests to `tParseValidElements.m`, `tBooleanArray.m`, and 
`hNumericArray.m` that verify the optimization works as expected.
   
   ### Are there any user-facing changes?
   They are not user-facing. 
   
   


-- 
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