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

Function AggregateClone

src/execution_plan/ops/op_aggregate.c:348–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348static OpBase *AggregateClone
349(
350 const ExecutionPlan *plan,
351 const OpBase *opBase
352) {
353 ASSERT(opBase->type == OPType_AGGREGATE);
354
355 OpAggregate *op = (OpAggregate *)opBase;
356 uint key_count = op->key_count;
357 uint aggregate_count = op->aggregate_count;
358 AR_ExpNode **exps = array_new(AR_ExpNode *, aggregate_count + key_count);
359
360 for(uint i = 0; i < key_count; i++) {
361 array_append(exps, AR_EXP_Clone(op->key_exps[i]));
362 }
363
364 for(uint i = 0; i < aggregate_count; i++) {
365 array_append(exps, AR_EXP_Clone(op->aggregate_exps[i]));
366 }
367
368 return NewAggregateOp(plan, exps);
369}
370
371// bind the Aggregate operation to the execution plan
372void AggregateBindToPlan

Callers

nothing calls this directly

Calls 2

AR_EXP_CloneFunction · 0.85
NewAggregateOpFunction · 0.85

Tested by

no test coverage detected