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

Function bit_length_binary_view

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

Source from the content-addressed store, hash-verified

609
610 #[test]
611 fn bit_length_binary_view() {
612 let value: Vec<&[u8]> = vec![
613 b"zero",
614 &[0xff, 0xf8],
615 b"two",
616 b"this is a longer string to test binary array with",
617 ];
618 let expected: Vec<i32> = vec![32, 16, 24, 392];
619
620 let array = BinaryViewArray::from(value);
621 let result = bit_length(&array).unwrap();
622 let result = result.as_any().downcast_ref::<Int32Array>().unwrap();
623 let expected: Int32Array = expected.into();
624 assert_eq!(&expected, result);
625 }
626
627 #[test]
628 fn bit_length_null_binary_view() {

Callers

nothing calls this directly

Calls 2

bit_lengthFunction · 0.85
as_anyMethod · 0.45

Tested by

no test coverage detected