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