Rich-T-kid commented on code in PR #10326:
URL: https://github.com/apache/arrow-rs/pull/10326#discussion_r3579475031


##########
arrow-data/src/transform/mod.rs:
##########
@@ -397,13 +397,12 @@ impl<'a> MutableArrayData<'a> {
     ///
     /// # Arguments
     /// * `arrays` - the source arrays to copy from
-    /// * `use_nulls` - a flag used to optimize insertions
-    ///   - `false` if the only source of nulls are the arrays themselves
-    ///   - `true` if the user plans to call [MutableArrayData::extend_nulls].
-    /// * capacity - the preallocated capacity of the output array, in bytes
+    /// * `use_nulls` - a flag indicating whether the caller intends to call 
`extend_nulls`.
+    ///   Note: null-handling is enabled automatically if any source array 
contains nulls.
+    /// * `capacity` - the preallocated capacity of the output array, in slots 
(number of elements)
     ///
-    /// Thus, if `use_nulls` is `false`, calling
-    /// [MutableArrayData::extend_nulls] should not be used.
+    /// Thus, if `use_nulls` is `false` and none of the source arrays contain 
nulls,
+    /// calling [MutableArrayData::extend_nulls] should not be used.

Review Comment:
   I mentioned that `MutableArrayData::extend_nulls` or 
`MutableArrayData::try_extend_nulls` will panic of called when the flag was set 
to false at creation time



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