| 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()); |
nothing calls this directly
no test coverage detected