| 297 | }; |
| 298 | |
| 299 | Result<std::unique_ptr<Buffer>> CompactTransposeMap( |
| 300 | const std::shared_ptr<ArrayData>& data, MemoryPool* pool, |
| 301 | std::shared_ptr<Array>& out_compact_dictionary) { |
| 302 | if (data->type->id() != Type::DICTIONARY) { |
| 303 | return Status::TypeError("Expected dictionary type"); |
| 304 | } |
| 305 | |
| 306 | const auto& dict_type = checked_cast<const DictionaryType&>(*data->type); |
| 307 | CompactTransposeMapVisitor visitor{data, pool, nullptr, nullptr}; |
| 308 | RETURN_NOT_OK(VisitTypeInline(*dict_type.index_type(), &visitor)); |
| 309 | |
| 310 | out_compact_dictionary = visitor.out_compact_dictionary; |
| 311 | return std::move(visitor.output_map); |
| 312 | } |
| 313 | } // namespace |
| 314 | |
| 315 | Result<std::shared_ptr<Array>> DictionaryArray::Transpose( |
no test coverage detected