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

Function bit_length_null_binary_view

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

Source from the content-addressed store, hash-verified

626
627 #[test]
628 fn bit_length_null_binary_view() {
629 let value: Vec<Option<&[u8]>> =
630 vec![Some(b"one"), None, Some(b"three"), Some(&[0xff, 0xf8])];
631 let expected: Vec<Option<i32>> = vec![Some(24), None, Some(40), Some(16)];
632
633 let array = BinaryViewArray::from(value);
634 let result = bit_length(&array).unwrap();
635 let result = result.as_any().downcast_ref::<Int32Array>().unwrap();
636 let expected: Int32Array = expected.into();
637 assert_eq!(&expected, result);
638 }
639
640 fn bit_length_null_cases() -> Vec<(Vec<OptionStr>, usize, Vec<Option<i32>>)> {
641 vec![(

Callers

nothing calls this directly

Calls 2

bit_lengthFunction · 0.85
as_anyMethod · 0.45

Tested by

no test coverage detected