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

Function execFunc

src/function/utility/coalesce.cpp:28–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28static void execFunc(const std::vector<std::shared_ptr<common::ValueVector>>& params,
29 const std::vector<common::SelectionVector*>& paramSelVectors, common::ValueVector& result,
30 common::SelectionVector* resultSelVector, void* /*dataPtr*/) {
31 result.resetAuxiliaryBuffer();
32 for (auto i = 0u; i < resultSelVector->getSelSize(); ++i) {
33 auto resultPos = (*resultSelVector)[i];
34 auto isNull = true;
35 for (size_t i = 0; i < params.size(); ++i) {
36 const auto& param = *params[i];
37 const auto& paramSelVector = *paramSelVectors[i];
38 auto paramPos = param.state->isFlat() ? paramSelVector[0] : resultPos;
39 if (!param.isNull(paramPos)) {
40 result.copyFromVectorData(resultPos, &param, paramPos);
41 isNull = false;
42 break;
43 }
44 }
45 result.setNull(resultPos, isNull);
46 }
47}
48
49static bool selectFunc(const std::vector<std::shared_ptr<ValueVector>>& params,
50 SelectionVector& selVector, void* /* dataPtr */) {

Callers

nothing calls this directly

Calls 7

getSelSizeMethod · 0.80
copyFromVectorDataMethod · 0.80
resetAuxiliaryBufferMethod · 0.45
sizeMethod · 0.45
isFlatMethod · 0.45
isNullMethod · 0.45
setNullMethod · 0.45

Tested by

no test coverage detected