MCPcopy Create free account
hub / github.com/apache/arrow / CompactTransposeMap

Function CompactTransposeMap

cpp/src/arrow/array/array_dict.cc:299–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297};
298
299Result<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
315Result<std::shared_ptr<Array>> DictionaryArray::Transpose(

Callers 1

CompactMethod · 0.85

Calls 4

VisitTypeInlineFunction · 0.85
index_typeMethod · 0.80
TypeErrorFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected