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

Method readFlatColToUnflatVector

src/processor/result/factorized_table.cpp:622–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622void FactorizedTable::readFlatColToUnflatVector(uint8_t** tuplesToRead, ft_col_idx_t colIdx,
623 ValueVector& vector, uint64_t numTuplesToRead) const {
624 vector.state->getSelVectorUnsafe().setSelSize(numTuplesToRead);
625 if (hasNoNullGuarantee(colIdx)) {
626 vector.setAllNonNull();
627 for (auto i = 0u; i < numTuplesToRead; i++) {
628 auto positionInVectorToWrite = vector.state->getSelVector()[i];
629 auto srcData = tuplesToRead[i] + tableSchema.getColOffset(colIdx);
630 vector.copyFromRowData(positionInVectorToWrite, srcData);
631 }
632 } else {
633 for (auto i = 0u; i < numTuplesToRead; i++) {
634 auto positionInVectorToWrite = vector.state->getSelVector()[i];
635 auto dataBuffer = tuplesToRead[i];
636 if (isNonOverflowColNull(dataBuffer + tableSchema.getNullMapOffset(), colIdx)) {
637 vector.setNull(positionInVectorToWrite, true);
638 } else {
639 vector.setNull(positionInVectorToWrite, false);
640 vector.copyFromRowData(positionInVectorToWrite,
641 dataBuffer + tableSchema.getColOffset(colIdx));
642 }
643 }
644 }
645}
646
647FactorizedTableIterator::FactorizedTableIterator(FactorizedTable& factorizedTable)
648 : factorizedTable{factorizedTable}, currentTupleBuffer{nullptr}, numFlatTuples{0},

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected