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

Method getNextTuple

src/processor/operator/physical_operator.cpp:206–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206bool PhysicalOperator::getNextTuple(ExecutionContext* context) {
207 if (context->clientContext->interrupted()) {
208 throw InterruptException{};
209 }
210#ifdef __SINGLE_THREADED__
211 // In single-threaded mode, the timeout cannot be checked in the main thread
212 // because the main thread is blocked by the task execution. Instead, we
213 // check the timeout in the processor. The timeout handling may still be
214 // delayed, but it is better than checking it at the end of each task.
215 // This is the best we can do now because SIGALRM is not cross-platform.
216 if (context->clientContext->hasTimeout()) {
217 if (context->clientContext->getTimeoutRemainingInMS() == 0) {
218 throw InterruptException{};
219 }
220 }
221#endif
222 metrics->executionTime.start();
223 auto result = getNextTuplesInternal(context);
224 ProgressBar::Get(*context->clientContext)
225 ->updateProgress(context->queryID, getProgress(context));
226 metrics->executionTime.stop();
227 return result;
228}
229
230void PhysicalOperator::finalize(ExecutionContext* context) {
231 if (!isSource()) {

Callers 15

getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
executeInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80
getNextTuplesInternalMethod · 0.80

Calls 5

getNextTuplesInternalFunction · 0.85
startMethod · 0.45
updateProgressMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected