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

Method compileFunc

src/function/struct/struct_pack_function.cpp:39–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void StructPackFunctions::compileFunc(FunctionBindData* /*bindData*/,
40 const std::vector<std::shared_ptr<ValueVector>>& parameters,
41 std::shared_ptr<ValueVector>& result) {
42 // Our goal is to make the state of the resultVector consistent with its children vectors.
43 // If the resultVector and inputVector are in different dataChunks, we should create a new
44 // child valueVector, which shares the state with the resultVector, instead of reusing the
45 // inputVector.
46 for (auto i = 0u; i < parameters.size(); i++) {
47 if (parameters[i]->state == result->state) {
48 StructVector::referenceVector(result.get(), i, parameters[i]);
49 }
50 }
51}
52
53void StructPackFunctions::undirectedRelCompileFunc(FunctionBindData*,
54 const std::vector<std::shared_ptr<ValueVector>>& parameters,

Callers 1

resolveResultVectorMethod · 0.45

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected