Extract relation and procedure context and expand derived child contexts.
| 963 | |
| 964 | // Extract relation and procedure context and expand derived child contexts. |
| 965 | void PASS1_expand_contexts(DsqlContextStack& contexts, dsql_ctx* context) |
| 966 | { |
| 967 | //// TODO: LocalTableSourceNode |
| 968 | if (context->ctx_relation || context->ctx_procedure || |
| 969 | context->ctx_map || context->ctx_win_maps.hasData()) |
| 970 | { |
| 971 | if (context->ctx_parent) |
| 972 | context = context->ctx_parent; |
| 973 | |
| 974 | contexts.push(context); |
| 975 | } |
| 976 | else |
| 977 | { |
| 978 | for (DsqlContextStack::iterator i(context->ctx_childs_derived_table); i.hasData(); ++i) |
| 979 | PASS1_expand_contexts(contexts, i.object()); |
| 980 | } |
| 981 | } |
| 982 | |
| 983 | |
| 984 | // Process derived table which is part of a from clause. |
no test coverage detected