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

Method from

arrow-array/src/array/null_array.rs:144–158  ·  view source on GitHub ↗
(data: ArrayData)

Source from the content-addressed store, hash-verified

142
143impl From<ArrayData> for NullArray {
144 fn from(data: ArrayData) -> Self {
145 let (data_type, len, nulls, _offset, buffers, _child_data) = data.into_parts();
146
147 assert_eq!(
148 data_type,
149 DataType::Null,
150 "NullArray data type should be Null"
151 );
152 assert_eq!(buffers.len(), 0, "NullArray data should contain 0 buffers");
153 assert!(
154 nulls.is_none(),
155 "NullArray data should not contain a null buffer, as no buffers are required"
156 );
157 Self { len }
158 }
159}
160
161impl From<NullArray> for ArrayData {

Callers

nothing calls this directly

Calls 3

into_partsMethod · 0.45
lenMethod · 0.45
build_uncheckedMethod · 0.45

Tested by

no test coverage detected