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

Function bit_length_offsets_binary

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

Source from the content-addressed store, hash-verified

718
719 #[test]
720 fn bit_length_offsets_binary() {
721 let value: Vec<Option<&[u8]>> = vec![Some(b"hello"), Some(&[]), Some(b"world"), None];
722 let a = BinaryArray::from(value);
723 let b = a.slice(1, 3);
724 let result = bit_length(&b).unwrap();
725 let result: &Int32Array = result.as_primitive();
726
727 let expected = Int32Array::from(vec![Some(0), Some(40), None]);
728 assert_eq!(&expected, result);
729 }
730
731 #[test]
732 fn length_dictionary() {

Callers

nothing calls this directly

Calls 3

bit_lengthFunction · 0.85
as_primitiveMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected