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

Function test_into_parts

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

Source from the content-addressed store, hash-verified

1127
1128 #[test]
1129 fn test_into_parts() {
1130 let boolean_array = [Some(true), None, Some(false)]
1131 .into_iter()
1132 .collect::<BooleanArray>();
1133 let (values, nulls) = boolean_array.into_parts();
1134 assert_eq!(values.values(), &[0b0000_0001]);
1135 assert!(nulls.is_some());
1136 assert_eq!(nulls.unwrap().buffer().as_slice(), &[0b0000_0101]);
1137
1138 let boolean_array =
1139 BooleanArray::from(vec![false, false, false, false, false, false, false, true]);
1140 let (values, nulls) = boolean_array.into_parts();
1141 assert_eq!(values.values(), &[0b1000_0000]);
1142 assert!(nulls.is_none());
1143 }
1144
1145 #[test]
1146 fn test_new_null_array() {

Callers

nothing calls this directly

Calls 2

into_iterMethod · 0.45
into_partsMethod · 0.45

Tested by

no test coverage detected