void start() { ActivityTimer s(totalCycles, timeActivities, NULL); dataLinkStart("TEMPTABLE", container.queryId()); currentRow = 0; isLocal = container.queryOwnerId() && container.queryOwner().isLocalOnly(); empty = isLocal ? false : !firstNode(); numRows = helper->numRows(); }
void getMetaInfo(ThorDataLinkMetaInfo &info) { initMetaInfo(info); info.isSource = true; info.unknownRowsOutput = false; if (isLocal || firstNode()) info.totalRowsMin = helper->numRows(); else info.totalRowsMin = 0; info.totalRowsMax = info.totalRowsMin; }
CATCH_NEXTROW() { ActivityTimer t(totalCycles, timeActivities, NULL); if (eof || abortSoon) return NULL; RtlDynamicRowBuilder row(queryRowAllocator()); size32_t sizeGot = helper->getRow(row, currentRow++); if (sizeGot) { dataLinkIncrement(); return row.finalizeRowClear(sizeGot); } eof = true; return NULL; }
CATCH_NEXTROW() { ActivityTimer t(totalCycles, timeActivities, NULL); if (empty || abortSoon) return NULL; // Filtering empty rows, returns the next valid row while (currentRow < numRows) { RtlDynamicRowBuilder row(queryRowAllocator()); size32_t sizeGot = helper->getRow(row, currentRow++); if (sizeGot) { dataLinkIncrement(); return row.finalizeRowClear(sizeGot); } } return NULL; }