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

Function bindFunc

src/function/map/map_creation_function.cpp:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace function {
10
11static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) {
12 auto keyType = ListType::getChildType(input.arguments[0]->dataType).copy();
13 auto valueType = ListType::getChildType(input.arguments[1]->dataType).copy();
14 if (keyType.containsAny()) {
15 keyType = LogicalType::JSON();
16 }
17 if (valueType.containsAny()) {
18 valueType = LogicalType::JSON();
19 }
20 auto resultType = LogicalType::MAP(std::move(keyType), std::move(valueType));
21 return FunctionBindData::getSimpleBindData(input.arguments, resultType);
22}
23
24function_set MapCreationFunctions::getFunctionSet() {
25 auto execFunc = ScalarFunction::BinaryExecWithBindData<list_entry_t, list_entry_t, list_entry_t,

Callers

nothing calls this directly

Calls 3

getChildTypeFunction · 0.85
copyMethod · 0.45
containsAnyMethod · 0.45

Tested by

no test coverage detected