psvri commented on code in PR #2592:
URL: https://github.com/apache/arrow-rs/pull/2592#discussion_r956542490
##########
arrow/src/array/builder/generic_binary_builder.rs:
##########
@@ -34,15 +34,8 @@ pub struct GenericBinaryBuilder<OffsetSize: OffsetSizeTrait>
{
impl<OffsetSize: OffsetSizeTrait> GenericBinaryBuilder<OffsetSize> {
/// Creates a new [`GenericBinaryBuilder`].
- /// `capacity` is the number of bytes in the values array.
- pub fn new(capacity: usize) -> Self {
- let mut offsets_builder = BufferBuilder::<OffsetSize>::new(1024);
- offsets_builder.append(OffsetSize::zero());
- Self {
- value_builder: UInt8BufferBuilder::new(capacity),
- offsets_builder,
- null_buffer_builder: NullBufferBuilder::new(1024),
- }
+ pub fn new() -> Self {
+ Self::with_capacity(1024, 1024)
Review Comment:
When we used new previously , it was using 1024 as capacity, hence I have
retained the same.
--
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]