WARNING: this facility can be called on invalid Array data by the IPC reader. Do not rely on the advertised ArrayData length, instead use the physical buffer sizes to avoid accessing memory out of bounds. (If this guarantee turns out to be difficult to maintain, we should call Validate() instead)
| 93 | // (If this guarantee turns out to be difficult to maintain, we should call |
| 94 | // Validate() instead) |
| 95 | Status SwapType(const DataType& type) { |
| 96 | RETURN_NOT_OK(VisitTypeInline(type, this)); |
| 97 | RETURN_NOT_OK(SwapChildren(type.fields())); |
| 98 | if (internal::may_have_validity_bitmap(type.id())) { |
| 99 | // Copy null bitmap |
| 100 | out_->buffers[0] = data_->buffers[0]; |
| 101 | } |
| 102 | return Status::OK(); |
| 103 | } |
| 104 | |
| 105 | Status SwapChildren(const FieldVector& child_fields) { |
| 106 | for (size_t i = 0; i < child_fields.size(); i++) { |
no test coverage detected