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

Method execFunc

src/function/list/list_creation.cpp:12–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace function {
11
12void ListCreationFunction::execFunc(
13 const std::vector<std::shared_ptr<common::ValueVector>>& parameters,
14 const std::vector<common::SelectionVector*>& parameterSelVectors, common::ValueVector& result,
15 common::SelectionVector* resultSelVector, void* /*dataPtr*/) {
16 result.resetAuxiliaryBuffer();
17 for (auto selectedPos = 0u; selectedPos < resultSelVector->getSelSize(); ++selectedPos) {
18 auto pos = (*resultSelVector)[selectedPos];
19 auto resultEntry = ListVector::addList(&result, parameters.size());
20 result.setValue(pos, resultEntry);
21 auto resultDataVector = ListVector::getDataVector(&result);
22 auto resultPos = resultEntry.offset;
23 for (auto i = 0u; i < parameters.size(); i++) {
24 const auto& parameter = parameters[i];
25 const auto& parameterSelVector = *parameterSelVectors[i];
26 auto paramPos = parameter->state->isFlat() ? parameterSelVector[0] : pos;
27 resultDataVector->copyFromVectorData(resultPos++, parameter.get(), paramPos);
28 }
29 }
30}
31
32static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) {
33 LogicalType combinedType(LogicalTypeID::ANY);

Callers 3

bindCastToUnionFunctionFunction · 0.45
runExecFuncMethod · 0.45
castMethod · 0.45

Calls 9

addListFunction · 0.85
getSelSizeMethod · 0.80
copyFromVectorDataMethod · 0.80
getDataVectorFunction · 0.50
resetAuxiliaryBufferMethod · 0.45
sizeMethod · 0.45
setValueMethod · 0.45
isFlatMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected