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

Method ExportFormat

cpp/src/arrow/c/bridge.cc:262–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260 }
261
262 Status ExportFormat(const DataType& type) {
263 if (type.id() == Type::DICTIONARY) {
264 const auto& dict_type = checked_cast<const DictionaryType&>(type);
265 if (dict_type.ordered()) {
266 flags_ |= ARROW_FLAG_DICTIONARY_ORDERED;
267 }
268 // Dictionary type: parent struct describes index type,
269 // child dictionary struct describes value type.
270 RETURN_NOT_OK(VisitTypeInline(*dict_type.index_type(), this));
271 dict_exporter_ = std::make_unique<SchemaExporter>();
272 RETURN_NOT_OK(dict_exporter_->ExportType(*dict_type.value_type()));
273 } else {
274 RETURN_NOT_OK(VisitTypeInline(type, this));
275 }
276 DCHECK(!export_.format_.empty());
277 return Status::OK();
278 }
279
280 Status ExportChildren(const std::vector<std::shared_ptr<Field>>& fields) {
281 export_.children_.resize(fields.size());

Callers

nothing calls this directly

Calls 7

VisitTypeInlineFunction · 0.85
index_typeMethod · 0.80
ExportTypeMethod · 0.80
OKFunction · 0.50
idMethod · 0.45
value_typeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected