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

Function test_slice_with_nulls

arrow-array/src/array/boolean_array.rs:1161–1171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1159
1160 #[test]
1161 fn test_slice_with_nulls() {
1162 let arr = BooleanArray::from(vec![Some(true), None, Some(false)]);
1163 let sliced = arr.slice(1, 2);
1164
1165 assert_eq!(sliced.len(), 2);
1166 assert_eq!(sliced.null_count(), 1);
1167
1168 assert!(sliced.is_null(0));
1169 assert!(sliced.is_valid(1));
1170 assert!(!sliced.value(1));
1171 }
1172
1173 #[test]
1174 fn test_has_true_has_false_all_true() {

Callers

nothing calls this directly

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected