MCPcopy Create free account
hub / github.com/apache/datafusion / test_array_remove_nullable

Function test_array_remove_nullable

datafusion/functions-nested/src/remove.rs:605–632  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

603
604 #[test]
605 fn test_array_remove_nullable() {
606 let input_list = Arc::new(ensure_field_nullability(
607 true,
608 ListArray::from_iter_primitive::<Int32Type, _, _>(vec![
609 Some(vec![
610 Some(1),
611 Some(2),
612 Some(2),
613 Some(3),
614 None,
615 Some(1),
616 Some(4),
617 ]),
618 Some(vec![Some(42), Some(2), None, Some(63), Some(2)]),
619 ]),
620 ));
621 let expected_list = ensure_field_nullability(
622 true,
623 ListArray::from_iter_primitive::<Int32Type, _, _>(vec![
624 Some(vec![Some(1), Some(2), Some(3), None, Some(1), Some(4)]),
625 Some(vec![Some(42), None, Some(63), Some(2)]),
626 ]),
627 );
628
629 let element_to_remove = ScalarValue::Int32(Some(2));
630
631 assert_array_remove(input_list, expected_list, element_to_remove);
632 }
633
634 fn assert_array_remove(
635 input_list: ArrayRef,

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
ensure_field_nullabilityFunction · 0.85
assert_array_removeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…