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

Method append_values

arrow-array/src/builder/boolean_builder.rs:137–147  ·  view source on GitHub ↗
(&mut self, values: &[bool], is_valid: &[bool])

Source from the content-addressed store, hash-verified

135 /// Returns an error if the slices are of different lengths
136 #[inline]
137 pub fn append_values(&mut self, values: &[bool], is_valid: &[bool]) -> Result<(), ArrowError> {
138 if values.len() != is_valid.len() {
139 Err(ArrowError::InvalidArgumentError(
140 "Value and validity lengths must be equal".to_string(),
141 ))
142 } else {
143 self.null_buffer_builder.append_slice(is_valid);
144 self.values_builder.append_slice(values);
145 Ok(())
146 }
147 }
148
149 /// Appends array values and null to this builder as is
150 /// (this means that underlying null values are copied as is).

Calls 2

lenMethod · 0.45
append_sliceMethod · 0.45