| 728 | } |
| 729 | |
| 730 | void FactorizedTableIterator::updateNumElementsInDataChunk() { |
| 731 | auto colOffsetInTupleBuffer = 0ul; |
| 732 | for (auto i = 0u; i < factorizedTable.getTableSchema()->getNumColumns(); i++) { |
| 733 | auto column = factorizedTable.getTableSchema()->getColumn(i); |
| 734 | auto groupID = column->getGroupID(); |
| 735 | // If this is an unflat column, the number of elements is stored in the |
| 736 | // overflow_value_t struct. Otherwise, the number of elements is 1. |
| 737 | auto numElementsInDataChunk = |
| 738 | column->isFlat() ? |
| 739 | 1 : |
| 740 | ((overflow_value_t*)(currentTupleBuffer + colOffsetInTupleBuffer))->numElements; |
| 741 | if (groupID >= flatTuplePositionsInDataChunk.size()) { |
| 742 | flatTuplePositionsInDataChunk.resize(groupID + 1); |
| 743 | } |
| 744 | flatTuplePositionsInDataChunk[groupID] = |
| 745 | std::make_pair(0 /* nextIdxToReadInDataChunk */, numElementsInDataChunk); |
| 746 | colOffsetInTupleBuffer += column->getNumBytes(); |
| 747 | } |
| 748 | } |
| 749 | |
| 750 | void FactorizedTableIterator::updateFlatTuplePositionsInDataChunk() { |
| 751 | for (auto i = 0u; i < flatTuplePositionsInDataChunk.size(); i++) { |
nothing calls this directly
no test coverage detected