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

Function JoinInit

src/execution_plan/ops/op_join.c:32–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32static OpResult JoinInit(OpBase *opBase) {
33 OpJoin *op = (OpJoin *)opBase;
34 // Start pulling from first stream.
35 op->streamIdx = 0;
36 op->stream = op->op.children[op->streamIdx];
37
38 // map first stream resultset mapping
39 ResultSet *result_set = QueryCtx_GetResultSet();
40
41 OpBase *parent = op->op.parent;
42 if(parent != NULL && parent->type != OPType_RESULTS) {
43 parent = parent->parent;
44 if(parent != NULL && parent->type != OPType_RESULTS) {
45 op->update_column_map = false;
46 }
47 }
48
49 if(result_set != NULL && op->update_column_map) {
50 OpBase *child = op->stream;
51 rax *mapping = ExecutionPlan_GetMappings(child->plan);
52 ResultSet_MapProjection(result_set, mapping);
53 }
54
55 return OP_OK;
56}
57
58static Record JoinConsume(OpBase *opBase) {
59 OpJoin *op = (OpJoin *)opBase;

Callers

nothing calls this directly

Calls 3

QueryCtx_GetResultSetFunction · 0.85
ResultSet_MapProjectionFunction · 0.85

Tested by

no test coverage detected