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

Function test_append_array

arrow-array/src/builder/boolean_builder.rs:367–395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365
366 #[test]
367 fn test_append_array() {
368 let input = vec![
369 Some(true),
370 None,
371 Some(true),
372 None,
373 Some(false),
374 None,
375 None,
376 None,
377 Some(false),
378 Some(false),
379 Some(false),
380 Some(true),
381 Some(false),
382 ];
383 let arr1 = BooleanArray::from(input[..5].to_vec());
384 let arr2 = BooleanArray::from(input[5..8].to_vec());
385 let arr3 = BooleanArray::from(input[8..].to_vec());
386
387 let mut builder = BooleanBuilder::new();
388 builder.append_array(&arr1);
389 builder.append_array(&arr2);
390 builder.append_array(&arr3);
391 let actual = builder.finish();
392 let expected = BooleanArray::from(input);
393
394 assert_eq!(actual, expected);
395 }
396
397 #[test]
398 fn test_append_array_add_underlying_null_values() {

Callers

nothing calls this directly

Calls 2

append_arrayMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected