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

Function AggregateReset

src/execution_plan/ops/op_aggregate.c:324–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324static OpResult AggregateReset
325(
326 OpBase *opBase
327) {
328 OpAggregate *op = (OpAggregate *)opBase;
329
330 if(op->group_iter != NULL) {
331 HashTableReleaseIterator(op->group_iter);
332 op->group_iter = NULL;
333 }
334
335 // re-create hashtable
336 unsigned long elem_count = HashTableElemCount(op->groups);
337 HashTableRelease(op->groups);
338
339 op->groups = HashTableCreate(&_dt);
340
341 // expand hashtable to previous element count
342 int res = HashTableExpand(op->groups, elem_count);
343 ASSERT(res == DICT_OK);
344
345 return OP_OK;
346}
347
348static OpBase *AggregateClone
349(

Callers

nothing calls this directly

Calls 5

HashTableReleaseIteratorFunction · 0.85
HashTableElemCountFunction · 0.85
HashTableReleaseFunction · 0.85
HashTableCreateFunction · 0.85
HashTableExpandFunction · 0.85

Tested by

no test coverage detected