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

Method get_single_valid_child_data

arrow-data/src/data.rs:1246–1252  ·  view source on GitHub ↗

Ensures that this array data has a single child_data with the expected type, and calls `validate()` on it. Returns a reference to that child_data

(
        &self,
        expected_type: &DataType,
    )

Source from the content-addressed store, hash-verified

1244 /// expected type, and calls `validate()` on it. Returns a
1245 /// reference to that child_data
1246 fn get_single_valid_child_data(
1247 &self,
1248 expected_type: &DataType,
1249 ) -> Result<&ArrayData, ArrowError> {
1250 self.validate_num_child_data(1)?;
1251 self.get_valid_child_data(0, expected_type)
1252 }
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> {

Callers 1

validate_child_dataMethod · 0.80

Calls 2

get_valid_child_dataMethod · 0.80

Tested by

no test coverage detected