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

Function test_validation_of_invalid_dictionary_array

arrow-ipc/src/reader.rs:3333–3344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3331 /// ListArray with invalid offsets
3332 #[test]
3333 fn test_validation_of_invalid_dictionary_array() {
3334 let array = unsafe {
3335 let values = StringArray::from_iter_values(["a", "b", "c"]);
3336 let keys = Int32Array::from(vec![1, 200]); // keys are not valid for values
3337 DictionaryArray::new_unchecked(keys, Arc::new(values))
3338 };
3339
3340 expect_ipc_validation_error(
3341 Arc::new(array),
3342 "Invalid argument error: Value at position 1 out of bounds: 200 (should be in [0, 2])",
3343 );
3344 }
3345
3346 #[test]
3347 fn test_validation_of_invalid_union_array() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected