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

Function NewIndexScanOp

src/execution_plan/ops/op_node_by_index_scan.c:24–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24OpBase *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
50static OpResult IndexScanInit(OpBase *opBase) {
51 IndexScan *op = (IndexScan *)opBase;

Callers 1

reduce_scan_opFunction · 0.85

Calls 3

rm_mallocFunction · 0.85
OpBase_InitFunction · 0.85
OpBase_ModifiesFunction · 0.85

Tested by

no test coverage detected