MCPcopy Create free account
hub / github.com/apache/arrow-rs / append_nulls

Method append_nulls

parquet-variant-compute/src/variant_array_builder.rs:160–169  ·  view source on GitHub ↗

Appends `n` null rows to the builder.

(&mut self, n: usize)

Source from the content-addressed store, hash-verified

158
159 /// Appends `n` null rows to the builder.
160 pub fn append_nulls(&mut self, n: usize) {
161 self.nulls.append_n_nulls(n);
162 // The subfields are expected to be non-nullable according to the parquet variant spec.
163 let metadata_offset = self.metadata_builder.offset();
164 let value_offset = self.value_builder.offset();
165 self.metadata_offsets
166 .extend(std::iter::repeat_n(metadata_offset, n));
167 self.value_offsets
168 .extend(std::iter::repeat_n(value_offset, n));
169 }
170
171 /// Append the [`Variant`] to the builder as the next row
172 pub fn append_variant(&mut self, variant: Variant) {

Calls 3

append_n_nullsMethod · 0.80
offsetMethod · 0.45
extendMethod · 0.45