| 14 | } |
| 15 | |
| 16 | bool Flatten::getNextTuplesInternal(ExecutionContext* context) { |
| 17 | if (localState->currentIdx == localState->sizeToFlatten) { |
| 18 | dataChunkState->setToUnflat(); // TODO(Xiyang): this should be part of restore/save |
| 19 | restoreSelVector(*dataChunkState); |
| 20 | if (!children[0]->getNextTuple(context)) { |
| 21 | return false; |
| 22 | } |
| 23 | localState->currentIdx = 0; |
| 24 | localState->sizeToFlatten = dataChunkState->getSelVector().getSelSize(); |
| 25 | saveSelVector(*dataChunkState); |
| 26 | dataChunkState->setToFlat(); |
| 27 | } |
| 28 | sel_t selPos = prevSelVector->operator[](localState->currentIdx++); |
| 29 | currentSelVector->operator[](0) = selPos; |
| 30 | metrics->numOutputTuple.incrementByOne(); |
| 31 | return true; |
| 32 | } |
| 33 | |
| 34 | void Flatten::resetCurrentSelVector(const SelectionVector&) {} |
| 35 |
nothing calls this directly
no test coverage detected