viirya commented on code in PR #3115:
URL: https://github.com/apache/arrow-rs/pull/3115#discussion_r1023587474


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -489,6 +519,43 @@ impl<T: ArrowPrimitiveType> PrimitiveArray<T> {
             )
         }
     }
+
+    /// Returns `PrimitiveBuilder` of this primitive array for mutating its 
values if the underlying
+    /// data buffer is not shared by others.
+    pub fn into_builder(self) -> Result<PrimitiveBuilder<T>, Self> {
+        let null_buffer = self
+            .data
+            .null_buffer()
+            .cloned()
+            .and_then(|b| b.into_mutable().ok());

Review Comment:
   Yea, that's why the doc test is failed now. Looking into how to make it work.



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