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

Method finish

arrow-array/src/builder/boolean_builder.rs:162–172  ·  view source on GitHub ↗

Builds the [BooleanArray] and reset this builder.

(&mut self)

Source from the content-addressed store, hash-verified

160
161 /// Builds the [BooleanArray] and reset this builder.
162 pub fn finish(&mut self) -> BooleanArray {
163 let len = self.len();
164 let null_bit_buffer = self.null_buffer_builder.finish();
165 let builder = ArrayData::builder(DataType::Boolean)
166 .len(len)
167 .add_buffer(self.values_builder.finish().into_inner())
168 .nulls(null_bit_buffer);
169
170 let array_data = unsafe { builder.build_unchecked() };
171 BooleanArray::from(array_data)
172 }
173
174 /// Builds the [BooleanArray] without resetting the builder.
175 pub fn finish_cloned(&self) -> BooleanArray {

Calls 5

add_bufferMethod · 0.80
lenMethod · 0.45
nullsMethod · 0.45
into_innerMethod · 0.45
build_uncheckedMethod · 0.45