creates a new CallSubquery operation
| 67 | |
| 68 | // creates a new CallSubquery operation |
| 69 | OpBase *NewCallSubqueryOp |
| 70 | ( |
| 71 | const ExecutionPlan *plan, // execution plan |
| 72 | bool is_eager, // is the subquery eager or not |
| 73 | bool is_returning // is the subquery returning or not |
| 74 | ) { |
| 75 | OpCallSubquery *op = rm_calloc(1, sizeof(OpCallSubquery)); |
| 76 | |
| 77 | op->first = true; |
| 78 | op->is_eager = is_eager; |
| 79 | op->is_returning = is_returning; |
| 80 | |
| 81 | // set the consume function according to eagerness of the op |
| 82 | fpConsume consumeFunc = is_eager ? |
| 83 | CallSubqueryConsumeEager : |
| 84 | CallSubqueryConsume; |
| 85 | |
| 86 | OpBase_Init((OpBase *)op, OPType_CALLSUBQUERY, "CallSubquery", |
| 87 | CallSubqueryInit, consumeFunc, CallSubqueryReset, NULL, |
| 88 | CallSubqueryClone, CallSubqueryFree, false, plan); |
| 89 | |
| 90 | return (OpBase *)op; |
| 91 | } |
| 92 | |
| 93 | static OpResult CallSubqueryInit |
| 94 | ( |
no test coverage detected