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

Method copyFromRowLayoutStruct

src/common/types/value/value.cpp:726–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724}
725
726void Value::copyFromRowLayoutStruct(const uint8_t* rowLayoutStruct) {
727 auto numFields = childrenSize;
728 auto structNullValues = rowLayoutStruct;
729 auto structValues = structNullValues + NullBuffer::getNumBytesForNullValues(numFields);
730 for (auto i = 0u; i < numFields; i++) {
731 auto childValue = children[i].get();
732 if (NullBuffer::isNull(structNullValues, i)) {
733 childValue->setNull(true);
734 } else {
735 childValue->setNull(false);
736 childValue->copyFromRowLayout(structValues);
737 }
738 structValues += storage::StorageUtils::getDataTypeSize(childValue->dataType);
739 }
740}
741
742void Value::copyFromColLayoutStruct(const struct_entry_t& structEntry, ValueVector* vec) {
743 for (auto i = 0u; i < childrenSize; i++) {

Callers

nothing calls this directly

Calls 4

copyFromRowLayoutMethod · 0.80
isNullFunction · 0.50
getMethod · 0.45
setNullMethod · 0.45

Tested by

no test coverage detected