jorgecarleitao commented on pull request #8543:
URL: https://github.com/apache/arrow/pull/8543#issuecomment-718835276


   The reason is that there was a private function (`slice_data`) in `array.rs` 
that was used on two different array types. I moved that function to be part of 
the `ArrayData`, `ArrayData::slice`, so that it can be used in multiple places 
(and is really a function that literally slices `ArrayData`). This is change 1.
   
   Since I made `slice` `pub`, I also added a unit test to it (change 2). I 
also noticed that there was some code duplication between that function 
(previously in `array.rs`, now in `data.rs`), and thus pulled that duplicated 
code to a separate function (`count_nulls`) for DRY (change 3). Theses changes 
implied that the `pub(crate)` data from `ArrayData` was no longer needed to be 
`pub` at all, and thus I just privatized them (this is not a public change, so 
all backward compatible), change 4. All these changes are done in the first 
commit only.
   
   Neither the DRY, unit-testing nor privatization was necessary as part of 
this PR. I can revert them if you think we should do this cleanup in a separate 
PR.


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

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


Reply via email to