| 1010 | } |
| 1011 | |
| 1012 | Result<std::shared_ptr<Schema>> MakeSchema() const { |
| 1013 | if (type_->id() != Type::STRUCT) { |
| 1014 | return Status::Invalid( |
| 1015 | "Cannot import schema: ArrowSchema describes non-struct type ", |
| 1016 | type_->ToString()); |
| 1017 | } |
| 1018 | return schema(type_->fields(), std::move(metadata_.metadata)); |
| 1019 | } |
| 1020 | |
| 1021 | Result<std::shared_ptr<DataType>> MakeType() const { return type_; } |
| 1022 |