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

Function test_zip_kernel_two

arrow-select/src/zip.rs:861–869  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

859
860 #[test]
861 fn test_zip_kernel_two() {
862 let a = Int32Array::from(vec![Some(5), None, Some(7), None, Some(1)]);
863 let b = Int32Array::from(vec![None, Some(3), Some(6), Some(7), Some(3)]);
864 let mask = BooleanArray::from(vec![false, false, true, true, false]);
865 let out = zip(&mask, &a, &b).unwrap();
866 let actual = out.as_any().downcast_ref::<Int32Array>().unwrap();
867 let expected = Int32Array::from(vec![None, Some(3), Some(7), None, Some(3)]);
868 assert_eq!(actual, &expected);
869 }
870
871 #[test]
872 fn test_zip_kernel_scalar_falsy_1() {

Callers

nothing calls this directly

Calls 2

zipFunction · 0.85
as_anyMethod · 0.45

Tested by

no test coverage detected