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

Function _ClonePlanInternals

src/execution_plan/execution_plan_clone.c:14–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#include "execution_plan_build/execution_plan_modify.h"
13
14static ExecutionPlan *_ClonePlanInternals(const ExecutionPlan *template) {
15 ExecutionPlan *clone = ExecutionPlan_NewEmptyExecutionPlan();
16
17 clone->record_map = raxClone(template->record_map);
18 if(template->ast_segment) clone->ast_segment = AST_ShallowCopy(template->ast_segment);
19 if(template->query_graph) {
20 QueryGraph_ResolveUnknownRelIDs(template->query_graph);
21 clone->query_graph = QueryGraph_Clone(template->query_graph);
22 }
23
24 return clone;
25}
26
27static OpBase *_CloneOpTree(OpBase *template_current, dict* old_to_new) {
28 ExecutionPlan *plan_segment;

Callers 1

_CloneOpTreeFunction · 0.85

Calls 5

raxCloneFunction · 0.85
AST_ShallowCopyFunction · 0.85
QueryGraph_CloneFunction · 0.85

Tested by

no test coverage detected