| 53 | } |
| 54 | |
| 55 | static ExecutionPlan *_ExecutionPlan_Clone(const ExecutionPlan *template) { |
| 56 | // create mapping from old exec-plans to the ones |
| 57 | dict *old_to_new = HashTableCreate(&def_dt); |
| 58 | |
| 59 | OpBase *clone_root = _CloneOpTree(template->root, old_to_new); |
| 60 | // The "master" execution plan is the one constructed with the root op. |
| 61 | ExecutionPlan *clone = (ExecutionPlan *)clone_root->plan; |
| 62 | |
| 63 | HashTableRelease(old_to_new); |
| 64 | |
| 65 | return clone; |
| 66 | } |
| 67 | |
| 68 | /* This function clones the input ExecutionPlan by recursively visiting its tree of ops. |
| 69 | * When an op is encountered that was constructed as part of a different ExecutionPlan segment, that segment |
no test coverage detected