| 138 | } // namespace |
| 139 | |
| 140 | Result<std::shared_ptr<Array>> RunEndEncodedArray::LogicalRunEnds( |
| 141 | MemoryPool* pool) const { |
| 142 | DCHECK(data()->child_data[0]->buffers[1]->is_cpu()); |
| 143 | switch (run_ends_array_->type_id()) { |
| 144 | case Type::INT16: |
| 145 | return MakeLogicalRunEnds<Int16Type>(*this, pool); |
| 146 | case Type::INT32: |
| 147 | return MakeLogicalRunEnds<Int32Type>(*this, pool); |
| 148 | default: |
| 149 | DCHECK_EQ(run_ends_array_->type_id(), Type::INT64); |
| 150 | return MakeLogicalRunEnds<Int64Type>(*this, pool); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | std::shared_ptr<Array> RunEndEncodedArray::LogicalValues() const { |
| 155 | const int64_t physical_offset = FindPhysicalOffset(); |