Merge the provided null buffer with the existing array's null buffer, if any.
(column: &ArrayRef, null_mask: Option<&NullBuffer>)
| 1289 | |
| 1290 | /// Merge the provided null buffer with the existing array's null buffer, if any. |
| 1291 | fn mask_nulls(column: &ArrayRef, null_mask: Option<&NullBuffer>) -> ArrayRef { |
| 1292 | if null_mask.is_none() { |
| 1293 | Arc::clone(column) |
| 1294 | } else { |
| 1295 | // We calculate stats on the nested arrays, so make sure we don't count entries |
| 1296 | // that are masked off at a higher level. |
| 1297 | let nulls = NullBuffer::union(null_mask, column.nulls()); |
| 1298 | let data = column |
| 1299 | .to_data() |
| 1300 | .into_builder() |
| 1301 | .nulls(nulls) |
| 1302 | .build() |
| 1303 | .expect("changed only null mask"); |
| 1304 | make_array(data) |
| 1305 | } |
| 1306 | } |
| 1307 | |
| 1308 | impl RowColumnarDecoder { |
| 1309 | /// Creates a [`RowColumnarDecoder`] that decodes from the provided [`StructArray`]. |