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

Method validate_equal_lengths

arrow-array/src/builder/map_builder.rs:159–168  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

157 /// Validates that key and value builders have equal lengths.
158 #[inline]
159 fn validate_equal_lengths(&self) -> Result<(), ArrowError> {
160 if self.key_builder.len() != self.value_builder.len() {
161 return Err(ArrowError::InvalidArgumentError(format!(
162 "Cannot append to a map builder when its keys and values have unequal lengths of {} and {}",
163 self.key_builder.len(),
164 self.value_builder.len()
165 )));
166 }
167 Ok(())
168 }
169
170 /// Finish the current map array slot
171 ///

Callers 2

appendMethod · 0.80
append_nullsMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected