tustvold opened a new issue, #1726:
URL: https://github.com/apache/arrow-rs/issues/1726

   **Describe the bug**
   
   Whilst perusing the code I noticed that `GenericBinaryArray::from_list` and 
`GenericBinaryArray::from_list` have the following logic
   
   ```
   let mut builder = ArrayData::builder(Self::get_data_type())
       .len(v.len())
       .add_buffer(v.data_ref().buffers()[0].clone())
       .add_buffer(v.data_ref().child_data()[0].buffers()[0].clone());
   if let Some(bitmap) = v.data_ref().null_bitmap() {
       builder = builder.null_bit_buffer(bitmap.bits.clone())
   }
   
   let data = unsafe { builder.build_unchecked() };
   ```
   
   This does not propagate any offset that might be present in the source data
   
   **To Reproduce**
   
   I suspect if you slice an ArrayList and then pass it to this method, you 
will lose the offset position.
   
   **Expected behavior**
   
   The offset, and probably the null count, should be preserved by both methods
   


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