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

Function bindFunc

src/function/union/union_value_function.cpp:9–18  ·  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 DASSERT(input.arguments.size() == 1);
11 std::vector<StructField> fields;
12 if (input.arguments[0]->getDataType().getLogicalTypeID() == common::LogicalTypeID::ANY) {
13 input.arguments[0]->cast(LogicalType::STRING());
14 }
15 fields.emplace_back(input.arguments[0]->getAlias(), input.arguments[0]->getDataType().copy());
16 auto resultType = LogicalType::UNION(std::move(fields));
17 return FunctionBindData::getSimpleBindData(input.arguments, resultType);
18}
19
20static void execFunc(const std::vector<std::shared_ptr<common::ValueVector>>&,
21 const std::vector<common::SelectionVector*>&, common::ValueVector& result,

Callers

nothing calls this directly

Calls 7

getLogicalTypeIDMethod · 0.80
getDataTypeMethod · 0.80
emplace_backMethod · 0.80
getAliasMethod · 0.80
sizeMethod · 0.45
castMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected