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

Function test_array_remove_n_nullable

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

Source from the content-addressed store, hash-verified

706
707 #[test]
708 fn test_array_remove_n_nullable() {
709 let input_list = Arc::new(ensure_field_nullability(
710 true,
711 ListArray::from_iter_primitive::<Int32Type, _, _>(vec![
712 Some(vec![
713 Some(1),
714 Some(2),
715 Some(2),
716 Some(3),
717 None,
718 Some(1),
719 Some(4),
720 ]),
721 Some(vec![Some(42), Some(2), None, Some(63), Some(2)]),
722 ]),
723 ));
724 let expected_list = ensure_field_nullability(
725 true,
726 ListArray::from_iter_primitive::<Int32Type, _, _>(vec![
727 Some(vec![Some(1), Some(3), None, Some(1), Some(4)]),
728 Some(vec![Some(42), None, Some(63)]),
729 ]),
730 );
731
732 let element_to_remove = ScalarValue::Int32(Some(2));
733
734 assert_array_remove_n(input_list, expected_list, element_to_remove, 2);
735 }
736
737 fn assert_array_remove_n(
738 input_list: ArrayRef,

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
ensure_field_nullabilityFunction · 0.85
assert_array_remove_nFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…