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

Function check_length

arrow-string/src/substring.rs:977–981  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

975
976 #[test]
977 fn check_length() {
978 let array = StringArray::from(vec![Some("E=mc²"), Some("ascii")]);
979 let err = substring(&array, 0, Some(5)).unwrap_err().to_string();
980 assert!(err.contains("invalid utf-8 boundary"));
981 }
982
983 #[test]
984 fn non_utf8_bytes() {

Callers

nothing calls this directly

Calls 1

substringFunction · 0.70

Tested by

no test coverage detected