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

Method appendStringToTable

src/processor/result/factorized_table_util.cpp:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void FactorizedTableUtils::appendStringToTable(FactorizedTable* factorizedTable,
42 const std::string& outputMsg, MemoryManager* memoryManager) {
43 auto outputMsgVector = std::make_shared<ValueVector>(LogicalTypeID::STRING, memoryManager);
44 outputMsgVector->state = DataChunkState::getSingleValueDataChunkState();
45 auto outputStr = string_t();
46 outputStr.overflowPtr =
47 reinterpret_cast<uint64_t>(StringVector::getInMemOverflowBuffer(outputMsgVector.get())
48 ->allocateSpace(outputMsg.length()));
49 outputStr.set(outputMsg);
50 outputMsgVector->setValue(0, outputStr);
51 factorizedTable->append(std::vector<ValueVector*>{outputMsgVector.get()});
52}
53
54void FactorizedTableUtils::appendNodeCopyResultToTable(FactorizedTable* factorizedTable,
55 const std::string& outputMsg, int64_t skippedDuplicatePKCount,

Callers

nothing calls this directly

Calls 8

getInMemOverflowBufferFunction · 0.85
allocateSpaceMethod · 0.80
lengthMethod · 0.80
string_tClass · 0.50
getMethod · 0.45
setMethod · 0.45
setValueMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected