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

Method readUnflatCol

src/processor/result/factorized_table.cpp:544–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544void FactorizedTable::readUnflatCol(uint8_t** tuplesToRead, ft_col_idx_t colIdx,
545 ValueVector& vector) const {
546 auto overflowColValue =
547 *(overflow_value_t*)(tuplesToRead[0] + tableSchema.getColOffset(colIdx));
548 DASSERT(vector.state->getSelVector().isUnfiltered());
549 auto numBytesPerValue = LogicalTypeUtils::getRowLayoutSize(vector.dataType);
550 if (hasNoNullGuarantee(colIdx)) {
551 vector.setAllNonNull();
552 auto val = overflowColValue.value;
553 for (auto i = 0u; i < overflowColValue.numElements; i++) {
554 vector.copyFromRowData(i, val);
555 val += numBytesPerValue;
556 }
557 } else {
558 auto overflowColNullData =
559 overflowColValue.value + overflowColValue.numElements * numBytesPerValue;
560 auto overflowColData = overflowColValue.value;
561 for (auto i = 0u; i < overflowColValue.numElements; i++) {
562 if (isOverflowColNull(overflowColNullData, i, colIdx)) {
563 vector.setNull(i, true);
564 } else {
565 vector.setNull(i, false);
566 vector.copyFromRowData(i, overflowColData);
567 }
568 overflowColData += numBytesPerValue;
569 }
570 }
571 vector.state->getSelVectorUnsafe().setSelSize(overflowColValue.numElements);
572}
573
574void FactorizedTable::readUnflatCol(const uint8_t* tupleToRead, const SelectionVector& selVector,
575 ft_col_idx_t colIdx, ValueVector& vector) const {

Callers

nothing calls this directly

Calls 6

hasNoNullGuaranteeFunction · 0.85
isUnfilteredMethod · 0.80
copyFromRowDataMethod · 0.80
setSelSizeMethod · 0.80
getSelSizeMethod · 0.80
setNullMethod · 0.45

Tested by

no test coverage detected