You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/23 09:37:18 UTC

[GitHub] [arrow-rs] tustvold opened a new issue, #1726: GenericBinaryArray::from_list and GenericStringArray::from_list Ignores Offset

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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold commented on issue #1726: GenericBinaryArray::from_list and GenericStringArray::from_list Ignores Offset

Posted by GitBox <gi...@apache.org>.
tustvold commented on issue #1726:
URL: https://github.com/apache/arrow-rs/issues/1726#issuecomment-1134459177

   The issue also seems to appear in `From<FixedSizeListArray> for FixedSizeBinaryArray` and similar 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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] HaoYang670 commented on issue #1726: GenericBinaryArray::from_list and GenericStringArray::from_list Ignores Offset

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #1726:
URL: https://github.com/apache/arrow-rs/issues/1726#issuecomment-1197945941

   I will work on this if no one else what to do it.


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


[GitHub] [arrow-rs] tustvold closed issue #1726: GenericBinaryArray::from_list and GenericStringArray::from_list Ignores Offset

Posted by GitBox <gi...@apache.org>.
tustvold closed issue #1726: GenericBinaryArray::from_list and GenericStringArray::from_list Ignores Offset
URL: https://github.com/apache/arrow-rs/issues/1726


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