HaoYang670 commented on code in PR #1988:
URL: https://github.com/apache/arrow-rs/pull/1988#discussion_r912366877


##########
arrow/src/array/builder/fixed_size_list_builder.rs:
##########
@@ -21,42 +21,37 @@ use std::sync::Arc;
 use crate::array::ArrayData;
 use crate::array::ArrayRef;
 use crate::array::FixedSizeListArray;
-use crate::array::Int32BufferBuilder;
 use crate::datatypes::DataType;
 use crate::datatypes::Field;
 use crate::error::Result;
 
 use super::ArrayBuilder;
 use super::BooleanBufferBuilder;
 
-///  Array builder for `ListArray`
+///  Array builder for [`FixedSizeListArray`]
 #[derive(Debug)]
 pub struct FixedSizeListBuilder<T: ArrayBuilder> {
     bitmap_builder: BooleanBufferBuilder,
     values_builder: T,
-    len: usize,
     list_len: i32,
 }
 
 impl<T: ArrayBuilder> FixedSizeListBuilder<T> {
-    /// Creates a new `FixedSizeListBuilder` from a given values array builder
-    /// `length` is the number of values within each array
-    pub fn new(values_builder: T, length: i32) -> Self {
+    /// Creates a new [`FixedSizeListBuilder`] from a given values array 
builder
+    /// `value_length` is the number of values within each array
+    pub fn new(values_builder: T, value_length: i32) -> Self {
         let capacity = values_builder.len();
-        Self::with_capacity(values_builder, length, capacity)
+        Self::with_capacity(values_builder, value_length, capacity)
     }
 
-    /// Creates a new `FixedSizeListBuilder` from a given values array builder
-    /// `length` is the number of values within each array
+    /// Creates a new [`FixedSizeListBuilder`] from a given values array 
builder
+    /// `value_length` is the number of values within each array
     /// `capacity` is the number of items to pre-allocate space for in this 
builder
-    pub fn with_capacity(values_builder: T, length: i32, capacity: usize) -> 
Self {
-        let mut offsets_builder = Int32BufferBuilder::new(capacity + 1);
-        offsets_builder.append(0);

Review Comment:
   This is unused.



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