File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ impl VectorMutOps for BoolVectorMut {
151151 }
152152
153153 fn append_nulls ( & mut self , n : usize ) {
154- self . bits . append_n ( false , n) ;
154+ self . bits . append_n ( false , n) ; // Note that the value we push doesn't actually matter.
155155 self . validity . append_n ( false , n) ;
156156 }
157157
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ impl<T: NativePType> VectorMutOps for PVecMut<T> {
184184 }
185185
186186 fn append_nulls ( & mut self , n : usize ) {
187- self . elements . push_n ( T :: zero ( ) , n) ;
187+ self . elements . push_n ( T :: zero ( ) , n) ; // Note that the value we push doesn't actually matter.
188188 self . validity . append_n ( false , n) ;
189189 }
190190
Original file line number Diff line number Diff line change @@ -20,12 +20,15 @@ pub struct StructVector {
2020
2121 /// The length of the vector (which is the same as all field vectors).
2222 ///
23- /// This is stored here as a convenience.
23+ /// This is stored here as a convenience, and also helps in the case that the `StructVector` has
24+ /// no fields.
2425 pub ( super ) len : usize ,
2526
26- /// The capacity of the vector (which is the same as all field vectors).
27+ /// The capacity of the vector (which is the less than or equal to the capacity of all field
28+ /// vectors).
2729 ///
28- /// This is stored here as a convenience for converting to/from a [`StructVectorMut`].
30+ /// This is stored here as a convenience for converting to/from a [`StructVectorMut`], and also
31+ /// helps in the case that the `StructVector` has no fields.
2932 pub ( super ) capacity : usize ,
3033
3134 /// The validity mask (where `true` represents an element is **not** null).
You can’t perform that action at this time.
0 commit comments