| 22 | } |
| 23 | |
| 24 | OpBase *NewIndexScanOp(const ExecutionPlan *plan, Graph *g, NodeScanCtx *n, |
| 25 | RSIndex *idx, FT_FilterNode *filter) { |
| 26 | // validate inputs |
| 27 | ASSERT(g != NULL); |
| 28 | ASSERT(idx != NULL); |
| 29 | ASSERT(plan != NULL); |
| 30 | ASSERT(filter != NULL); |
| 31 | |
| 32 | IndexScan *op = rm_malloc(sizeof(IndexScan)); |
| 33 | op->g = g; |
| 34 | op->n = n; |
| 35 | op->idx = idx; |
| 36 | op->iter = NULL; |
| 37 | op->filter = filter; |
| 38 | op->child_record = NULL; |
| 39 | op->unresolved_filters = NULL; |
| 40 | op->rebuild_index_query = false; |
| 41 | |
| 42 | // Set our Op operations |
| 43 | OpBase_Init((OpBase *)op, OPType_NODE_BY_INDEX_SCAN, "Node By Index Scan", IndexScanInit, IndexScanConsume, |
| 44 | IndexScanReset, IndexScanToString, NULL, IndexScanFree, false, plan); |
| 45 | |
| 46 | op->nodeRecIdx = OpBase_Modifies((OpBase *)op, n->alias); |
| 47 | return (OpBase *)op; |
| 48 | } |
| 49 | |
| 50 | static OpResult IndexScanInit(OpBase *opBase) { |
| 51 | IndexScan *op = (IndexScan *)opBase; |
no test coverage detected