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

Function bindFunc

src/function/utility/constant_or_null.cpp:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace function {
8
9static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) {
10 logical_type_vec_t paramTypes;
11 for (auto& argument : input.arguments) {
12 if (argument->getDataType().getLogicalTypeID() == LogicalTypeID::ANY) {
13 paramTypes.push_back(LogicalType::STRING());
14 } else {
15 paramTypes.push_back(argument->getDataType().copy());
16 }
17 }
18 auto bindData = std::make_unique<FunctionBindData>(paramTypes[0].copy());
19 bindData->paramTypes = std::move(paramTypes);
20 return bindData;
21}
22
23static void execFunc(const std::vector<std::shared_ptr<common::ValueVector>>& params,
24 const std::vector<common::SelectionVector*>& paramSelVectors, common::ValueVector& result,

Callers

nothing calls this directly

Calls 4

getLogicalTypeIDMethod · 0.80
getDataTypeMethod · 0.80
push_backMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected