| 81 | CastMetaFunction() : MetaFunction("cast", Arity::Unary(), cast_doc) {} |
| 82 | |
| 83 | Result<const CastOptions*> ValidateOptions(const FunctionOptions* options) const { |
| 84 | auto cast_options = static_cast<const CastOptions*>(options); |
| 85 | |
| 86 | if (cast_options == nullptr || cast_options->to_type == nullptr) { |
| 87 | return Status::Invalid( |
| 88 | "Cast requires that options be passed with " |
| 89 | "the to_type populated"); |
| 90 | } |
| 91 | |
| 92 | return cast_options; |
| 93 | } |
| 94 | |
| 95 | Result<Datum> ExecuteImpl(const std::vector<Datum>& args, |
| 96 | const FunctionOptions* options, |