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

Function length_test_binary_view

arrow-string/src/length.rs:305–319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304 #[test]
305 fn length_test_binary_view() {
306 let value: Vec<&[u8]> = vec![
307 b"zero",
308 &[0xff, 0xf8],
309 b"two",
310 b"this is a longer string to test binary array with",
311 ];
312 let expected: Vec<i32> = vec![4, 2, 3, 49];
313
314 let array = BinaryViewArray::from(value);
315 let result = length(&array).unwrap();
316 let result = result.as_any().downcast_ref::<Int32Array>().unwrap();
317 let expected: Int32Array = expected.into();
318 assert_eq!(&expected, result);
319 }
320
321 #[test]
322 fn length_test_list() {

Callers

nothing calls this directly

Calls 2

lengthFunction · 0.85
as_anyMethod · 0.45

Tested by

no test coverage detected