| 133 | } |
| 134 | |
| 135 | Status VisitFixedWidthArray(const Buffer& buffer, const FixedWidthType& type) const { |
| 136 | uint64_t data_start = reinterpret_cast<uint64_t>(buffer.data()); |
| 137 | uint64_t offset_bits = offset * type.bit_width(); |
| 138 | uint64_t offset_bytes = bit_util::RoundDown(static_cast<int64_t>(offset_bits), 8) / 8; |
| 139 | uint64_t end_byte = |
| 140 | bit_util::RoundUp(static_cast<int64_t>(offset_bits + (length * type.bit_width())), |
| 141 | 8) / |
| 142 | 8; |
| 143 | uint64_t length_bytes = (end_byte - offset_bytes); |
| 144 | RETURN_NOT_OK(range_starts->Append(data_start)); |
| 145 | RETURN_NOT_OK(range_offsets->Append(offset_bytes)); |
| 146 | return range_lengths->Append(length_bytes); |
| 147 | } |
| 148 | |
| 149 | Status Visit(const FixedWidthType& type) const { |
| 150 | static_assert(sizeof(uint8_t*) <= sizeof(uint64_t), |