(data: ArrayData)
| 142 | |
| 143 | impl 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 | |
| 161 | impl From<NullArray> for ArrayData { |
nothing calls this directly
no test coverage detected