MCPcopy Create free account
hub / github.com/apache/arrow / ValidateOptions

Method ValidateOptions

cpp/src/arrow/compute/cast.cc:83–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 1

InvalidFunction · 0.50

Tested by

no test coverage detected