tustvold commented on code in PR #2699:
URL: https://github.com/apache/arrow-rs/pull/2699#discussion_r967767856


##########
arrow/src/array/builder/generic_string_builder.rs:
##########
@@ -28,16 +28,17 @@ pub struct GenericStringBuilder<OffsetSize: 
OffsetSizeTrait> {
 }
 
 impl<OffsetSize: OffsetSizeTrait> GenericStringBuilder<OffsetSize> {
-    /// Creates a new [`GenericStringBuilder`],
+    /// Creates a new [`GenericStringBuilder`].
     pub fn new() -> Self {
         Self {
             builder: GenericBinaryBuilder::new(),
         }
     }
 
-    /// Creates a new [`GenericStringBuilder`],
-    /// `data_capacity` is the number of bytes of string data to pre-allocate 
space for in this builder
-    /// `item_capacity` is the number of items to pre-allocate space for in 
this builder
+    /// Creates a new [`GenericStringBuilder`].
+    ///
+    /// - `item_capacity` is the number of items to pre-allocate (the size of 
the buffer of offsets).

Review Comment:
   ```suggestion
       /// - `item_capacity` is the number of items to pre-allocate (i.e. the 
final length of the array).
   ```
   Or something, the offsets is actually one larger than this 😅



##########
arrow/src/array/builder/generic_binary_builder.rs:
##########
@@ -38,9 +38,10 @@ impl<OffsetSize: OffsetSizeTrait> 
GenericBinaryBuilder<OffsetSize> {
         Self::with_capacity(1024, 1024)
     }
 
-    /// Creates a new [`GenericBinaryBuilder`],
-    /// `item_capacity` is the number of items to pre-allocate space for in 
this builder
-    /// `data_capacity` is the number of bytes to pre-allocate space for in 
this builder
+    /// Creates a new [`GenericBinaryBuilder`].
+    ///
+    /// - `item_capacity` is the number of items to pre-allocate (the size of 
the buffer of offsets).

Review Comment:
   ```suggestion
       /// - `item_capacity` is the number of items to pre-allocate (i.e. the 
final length of the array).
   ```



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