restores `outer_names` to its original size by freeing the added components
| 486 | |
| 487 | // restores `outer_names` to its original size by freeing the added components |
| 488 | static void _restore_outer_internal_names |
| 489 | ( |
| 490 | char ***outer_names, // expanded context |
| 491 | int orig_size // original context size |
| 492 | ) { |
| 493 | // free added names |
| 494 | int n_added_names = array_len(*outer_names) - orig_size; |
| 495 | for(int i = 0; i < n_added_names; i++) { |
| 496 | char *name = array_pop(*outer_names); |
| 497 | rm_free(name); |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | // rewrites the subquery to contain the projections needed in case of an |
| 502 | // eager and returning execution-plan such that bound vars will |
no test coverage detected