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

Function test_pad_nulls_empty

parquet/src/arrow/buffer/offset_buffer.rs:334–344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

332
333 #[test]
334 fn test_pad_nulls_empty() {
335 let mut buffer = OffsetBuffer::<i32>::with_capacity(0);
336 let valid_mask = Buffer::from_iter(std::iter::repeat_n(false, 9));
337 buffer.pad_nulls(0, 0, 9, valid_mask.as_slice());
338
339 let array = buffer.into_array(Some(valid_mask), ArrowType::Utf8);
340 let strings = array.as_any().downcast_ref::<StringArray>().unwrap();
341
342 assert_eq!(strings.len(), 9);
343 assert!(strings.iter().all(|x| x.is_none()))
344 }
345}

Callers

nothing calls this directly

Calls 5

from_iterFunction · 0.50
pad_nullsMethod · 0.45
as_sliceMethod · 0.45
into_arrayMethod · 0.45
as_anyMethod · 0.45

Tested by

no test coverage detected