MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / ExecutionPlan_Execute

Function ExecutionPlan_Execute

src/execution_plan/execution_plan.c:436–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436ResultSet *ExecutionPlan_Execute(ExecutionPlan *plan) {
437 ASSERT(plan->prepared)
438 // Set an exception-handling breakpoint to capture run-time errors.
439 // encountered_error will be set to 0 when setjmp is invoked, and will be nonzero if
440 // a downstream exception returns us to this breakpoint
441 int encountered_error = SET_EXCEPTION_HANDLER();
442
443 // Encountered a run-time error - return immediately.
444 if(encountered_error) return QueryCtx_GetResultSet();
445
446 ExecutionPlan_Init(plan);
447
448 Record r = NULL;
449 // Execute the root operation and free the processed Record until the data stream is depleted.
450 while((r = OpBase_Consume(plan->root)) != NULL) ExecutionPlan_ReturnRecord(r->owner, r);
451
452 return QueryCtx_GetResultSet();
453}
454
455//------------------------------------------------------------------------------
456// Execution plan draining

Callers 2

_ExecuteQueryFunction · 0.85
ExecutionPlan_ProfileFunction · 0.85

Calls 4

QueryCtx_GetResultSetFunction · 0.85
ExecutionPlan_InitFunction · 0.85
OpBase_ConsumeFunction · 0.85

Tested by

no test coverage detected