| 61 | } |
| 62 | |
| 63 | KeyColumnArray KeyColumnArray::WithBufferFrom(const KeyColumnArray& other, |
| 64 | int buffer_id_to_replace) const { |
| 65 | KeyColumnArray copy = *this; |
| 66 | copy.mutable_buffers_[buffer_id_to_replace] = |
| 67 | other.mutable_buffers_[buffer_id_to_replace]; |
| 68 | copy.buffers_[buffer_id_to_replace] = other.buffers_[buffer_id_to_replace]; |
| 69 | if (buffer_id_to_replace < kMaxBuffers - 1) { |
| 70 | copy.bit_offset_[buffer_id_to_replace] = other.bit_offset_[buffer_id_to_replace]; |
| 71 | } |
| 72 | return copy; |
| 73 | } |
| 74 | |
| 75 | KeyColumnArray KeyColumnArray::WithMetadata(const KeyColumnMetadata& metadata) const { |
| 76 | KeyColumnArray copy = *this; |