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

Function length_offsets_string

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

Source from the content-addressed store, hash-verified

499 /// Tests with an offset
500 #[test]
501 fn length_offsets_string() {
502 let a = StringArray::from(vec![Some("hello"), Some(" "), Some("world"), None]);
503 let b = a.slice(1, 3);
504 let result = length(&b).unwrap();
505 let result: &Int32Array = result.as_primitive();
506
507 let expected = Int32Array::from(vec![Some(1), Some(5), None]);
508 assert_eq!(&expected, result);
509 }
510
511 #[test]
512 fn length_offsets_binary() {

Callers

nothing calls this directly

Calls 3

lengthFunction · 0.85
as_primitiveMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected