| 53 | } |
| 54 | |
| 55 | Result<std::shared_ptr<DataType>> JsonExtensionType::Make( |
| 56 | std::shared_ptr<DataType> storage_type) { |
| 57 | if (!IsSupportedStorageType(storage_type->id())) { |
| 58 | return Status::Invalid("Invalid storage type for JsonExtensionType: ", |
| 59 | storage_type->ToString()); |
| 60 | } |
| 61 | return std::make_shared<JsonExtensionType>(std::move(storage_type)); |
| 62 | } |
| 63 | |
| 64 | std::shared_ptr<DataType> json(std::shared_ptr<DataType> storage_type) { |
| 65 | return JsonExtensionType::Make(std::move(storage_type)).ValueOrDie(); |