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

Function _handoff_eager

src/execution_plan/ops/op_call_subquery.c:153–167  ·  view source on GitHub ↗

passes a record to the parent op. if the subquery is non-returning, yield input record(s) otherwise, yields a record produced by the subquery

Source from the content-addressed store, hash-verified

151// if the subquery is non-returning, yield input record(s)
152// otherwise, yields a record produced by the subquery
153static Record _handoff_eager
154(
155 OpCallSubquery *op // CallSubquery operation
156) {
157 ASSERT(op->is_returning || op->records != NULL);
158
159 if(!op->is_returning) {
160 // if there is a record to return from the input records, return it
161 // NOTICE: The order of records reverses here.
162 return array_len(op->records) > 0 ? array_pop(op->records) : NULL;
163 }
164
165 // returning subquery
166 return OpBase_Consume(op->body);
167}
168
169// eagerly consume and aggregate all the records from the lhs (if exists). pass
170// the aggregated record-list to the ArgumentList operation(s)

Callers 1

CallSubqueryConsumeEagerFunction · 0.85

Calls 2

array_lenFunction · 0.85
OpBase_ConsumeFunction · 0.85

Tested by

no test coverage detected