| 30 | } |
| 31 | |
| 32 | static 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 | |
| 58 | static Record JoinConsume(OpBase *opBase) { |
| 59 | OpJoin *op = (OpJoin *)opBase; |
nothing calls this directly
no test coverage detected