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

Method getNext

src/processor/result/factorized_table.cpp:653–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651}
652
653void FactorizedTableIterator::getNext(FlatTuple& tuple) {
654 // Go to the next tuple if we have iterated all the flat tuples of the current tuple.
655 if (nextFlatTupleIdx >= numFlatTuples) {
656 currentTupleBuffer = factorizedTable.getTuple(nextTupleIdx);
657 numFlatTuples = factorizedTable.getNumFlatTuples(nextTupleIdx);
658 nextFlatTupleIdx = 0;
659 updateNumElementsInDataChunk();
660 nextTupleIdx++;
661 }
662 for (auto i = 0ul; i < factorizedTable.getTableSchema()->getNumColumns(); i++) {
663 auto column = factorizedTable.getTableSchema()->getColumn(i);
664 if (column->isFlat()) {
665 readFlatColToFlatTuple(i, currentTupleBuffer, tuple);
666 } else {
667 readUnflatColToFlatTuple(i, currentTupleBuffer, tuple);
668 }
669 }
670 updateFlatTuplePositionsInDataChunk();
671 nextFlatTupleIdx++;
672}
673
674void FactorizedTableIterator::resetState() {
675 numFlatTuples = 0;

Callers 15

printExecutionResultMethod · 0.45
runCaseFunction · 0.45
profileQueryIfEnabledMethod · 0.45
TEST_FFunction · 0.45
checkResultNumericMethod · 0.45
convertResultToStringMethod · 0.45
initMethod · 0.45
checkForLeakedPagesMethod · 0.45

Calls 6

getNumFlatTuplesMethod · 0.80
getColumnMethod · 0.80
getTupleMethod · 0.45
getNumColumnsMethod · 0.45
getTableSchemaMethod · 0.45
isFlatMethod · 0.45

Tested by 15

TEST_FFunction · 0.36
checkResultNumericMethod · 0.36
convertResultToStringMethod · 0.36
validateMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
detachDeleteNodeMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36