MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / arrayTemplateBindFunc

Function arrayTemplateBindFunc

src/function/array/array_functions.cpp:154–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153template<typename OPERATION>
154std::unique_ptr<FunctionBindData> arrayTemplateBindFunc(std::string functionName,
155 ScalarBindFuncInput input) {
156 auto leftType = interpretLogicalType(input.arguments[0].get());
157 auto rightType = interpretLogicalType(input.arguments[1].get());
158 auto paramType = validateArrayFunctionParameters(leftType, rightType, functionName);
159 input.definition->ptrCast<ScalarFunction>()->execFunc =
160 std::move(getScalarExecFunc<OPERATION>(paramType.copy()));
161 auto bindData = std::make_unique<FunctionBindData>(ArrayType::getChildType(paramType).copy());
162 std::vector<LogicalType> paramTypes;
163 for (auto& _ : input.arguments) {
164 (void)_;
165 bindData->paramTypes.push_back(paramType.copy());
166 }
167 return bindData;
168}
169
170template<typename OPERATION>
171function_set templateGetFunctionSet(const std::string& functionName) {

Callers

nothing calls this directly

Calls 6

interpretLogicalTypeFunction · 0.85
getChildTypeFunction · 0.85
getMethod · 0.45
copyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected