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

Method copyFromRowData

src/common/vector/value_vector.cpp:92–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void ValueVector::copyFromRowData(uint32_t pos, const uint8_t* rowData) {
93 switch (dataType.getPhysicalType()) {
94 case PhysicalTypeID::STRUCT: {
95 StructVector::copyFromRowData(this, pos, rowData);
96 } break;
97 case PhysicalTypeID::ARRAY:
98 case PhysicalTypeID::LIST: {
99 ListVector::copyFromRowData(this, pos, rowData);
100 } break;
101 case PhysicalTypeID::STRING:
102 case PhysicalTypeID::JSON: {
103 StringVector::addString(this, pos, *(string_t*)rowData);
104 } break;
105 default: {
106 auto dataTypeSize = LogicalTypeUtils::getRowLayoutSize(dataType);
107 memcpy(getData() + pos * dataTypeSize, rowData, dataTypeSize);
108 }
109 }
110}
111
112void ValueVector::copyToRowData(uint32_t pos, uint8_t* rowData,
113 InMemOverflowBuffer* rowOverflowBuffer) const {

Callers 5

writeToVectorMethod · 0.80
writeToVectorMethod · 0.80
readUnflatColMethod · 0.80

Calls 8

addListFunction · 0.85
getFieldVectorsFunction · 0.85
getDataFunction · 0.50
getDataVectorFunction · 0.50
isNullFunction · 0.50
getPhysicalTypeMethod · 0.45
setNullMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected