datapythonista commented on code in PR #2699:
URL: https://github.com/apache/arrow-rs/pull/2699#discussion_r967799851
##########
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:
Very good point, thanks a lot for the feedback. I added a note about the
size of the buffer being one larger, I personally think this should make things
very clear, but let me know if you have any other comment.
--
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]