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

Method getNextTuplesInternal

src/processor/operator/flatten.cpp:16–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16bool 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
34void Flatten::resetCurrentSelVector(const SelectionVector&) {}
35

Callers

nothing calls this directly

Calls 4

getNextTupleMethod · 0.80
getSelSizeMethod · 0.80
incrementByOneMethod · 0.80
operator[]Method · 0.45

Tested by

no test coverage detected