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

Function test_invalid_utf8_array

arrow-row/src/lib.rs:3056–3066  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3054 #[test]
3055 #[should_panic(expected = "Encountered non UTF-8 data")]
3056 fn test_invalid_utf8_array() {
3057 let converter = RowConverter::new(vec![SortField::new(DataType::Binary)]).unwrap();
3058 let array = Arc::new(BinaryArray::from_iter_values([&[0xFF]])) as _;
3059 let rows = converter.convert_columns(&[array]).unwrap();
3060 let binary_rows = rows.try_into_binary().expect("known-small rows");
3061
3062 let converter = RowConverter::new(vec![SortField::new(DataType::Utf8)]).unwrap();
3063 let parsed = converter.from_binary(binary_rows);
3064
3065 converter.convert_rows(parsed.iter()).unwrap();
3066 }
3067
3068 #[test]
3069 #[should_panic(expected = "index out of bounds")]

Callers

nothing calls this directly

Calls 5

convert_columnsMethod · 0.80
try_into_binaryMethod · 0.80
convert_rowsMethod · 0.80
from_binaryMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected