Returns `Err` if self.child_data does not have exactly `expected_len` elements
(&self, expected_len: usize)
| 1253 | |
| 1254 | /// Returns `Err` if self.child_data does not have exactly `expected_len` elements |
| 1255 | fn validate_num_child_data(&self, expected_len: usize) -> Result<(), ArrowError> { |
| 1256 | if self.child_data.len() != expected_len { |
| 1257 | Err(ArrowError::InvalidArgumentError(format!( |
| 1258 | "Value data for {} should contain {} child data array(s), had {}", |
| 1259 | self.data_type, |
| 1260 | expected_len, |
| 1261 | self.child_data.len() |
| 1262 | ))) |
| 1263 | } else { |
| 1264 | Ok(()) |
| 1265 | } |
| 1266 | } |
| 1267 | |
| 1268 | /// Ensures that `child_data[i]` has the expected type, calls |
| 1269 | /// `validate()` on it, and returns a reference to that child_data |
no test coverage detected