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

Function execFunc

src/function/list/list_transform.cpp:52–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static void execFunc(const std::vector<std::shared_ptr<ValueVector>>& input,
53 const std::vector<SelectionVector*>& inputSelVectors, ValueVector& result,
54 SelectionVector* resultSelVector, void* bindData_) {
55 auto bindData = reinterpret_cast<evaluator::ListLambdaBindData*>(bindData_);
56 auto* sliceInfo = bindData->sliceInfo;
57 auto savedParamStates = sliceInfo->overrideAndSaveParamStates(bindData->lambdaParamEvaluators);
58
59 bindData->rootEvaluator->evaluate();
60 copyEvaluatedDataToResult(result, bindData);
61
62 auto& inputVector = *input[0];
63 const auto& inputSelVector = *inputSelVectors[0];
64 DASSERT(input.size() == 2);
65 if (!bindData->lambdaParamEvaluators.empty()) {
66 if (sliceInfo->done()) {
67 ListVector::copyListEntryAndBufferMetaData(result, *resultSelVector, inputVector,
68 inputSelVector);
69 }
70 } else {
71 if (sliceInfo->done()) {
72 copyListEntriesToResult(inputVector, inputSelVector, result);
73 }
74 }
75
76 sliceInfo->restoreParamStates(bindData->lambdaParamEvaluators, std::move(savedParamStates));
77}
78
79function_set ListTransformFunction::getFunctionSet() {
80 function_set result;

Callers

nothing calls this directly

Calls 8

copyListEntriesToResultFunction · 0.85
restoreParamStatesMethod · 0.80
evaluateMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected