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

Function CheckArityImpl

cpp/src/arrow/compute/function.cc:84–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82const FunctionDoc& FunctionDoc::Empty() { return kEmptyFunctionDoc; }
83
84static Status CheckArityImpl(const Function& func, int num_args) {
85 if (func.arity().is_varargs && num_args < func.arity().num_args) {
86 return Status::Invalid("VarArgs function '", func.name(), "' needs at least ",
87 func.arity().num_args, " arguments but only ", num_args,
88 " passed");
89 }
90
91 if (!func.arity().is_varargs && num_args != func.arity().num_args) {
92 return Status::Invalid("Function '", func.name(), "' accepts ", func.arity().num_args,
93 " arguments but ", num_args, " passed");
94 }
95 return Status::OK();
96}
97
98Status Function::CheckArity(size_t num_args) const {
99 return CheckArityImpl(*this, static_cast<int>(num_args));

Callers 2

CheckArityMethod · 0.85
ExecuteMethod · 0.85

Calls 3

InvalidFunction · 0.50
OKFunction · 0.50
nameMethod · 0.45

Tested by

no test coverage detected