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

Function from_repeated_length_unit_length

arrow-buffer/src/buffer/offset.rs:542–549  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

540
541 #[test]
542 fn from_repeated_length_unit_length() {
543 // Length 1, repeated multiple times
544 let buffer = OffsetBuffer::<i32>::from_repeated_length(1, 10);
545 assert_eq!(buffer.as_ref(), &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
546
547 let lengths: Vec<usize> = buffer.lengths().collect();
548 assert_eq!(lengths, vec![1; 10]);
549 }
550
551 #[test]
552 fn from_repeated_length_max_safe_values() {

Callers

nothing calls this directly

Calls 2

collectMethod · 0.80
lengthsMethod · 0.45

Tested by

no test coverage detected