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

Function CompactTransposeMap

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

Source from the content-addressed store, hash-verified

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