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