1074 def build_select_plan(self, plan, rqlst): |
1074 def build_select_plan(self, plan, rqlst): |
1075 """build execution plan for a SELECT RQL query |
1075 """build execution plan for a SELECT RQL query |
1076 |
1076 |
1077 the rqlst should not be tagged at this point |
1077 the rqlst should not be tagged at this point |
1078 """ |
1078 """ |
1079 if server.DEBUG & server.DBG_MS: |
|
1080 print '-'*80 |
|
1081 print 'PLANNING', rqlst |
|
1082 # preprocess deals with security insertion and returns a new syntax tree |
1079 # preprocess deals with security insertion and returns a new syntax tree |
1083 # which have to be executed to fulfill the query: according |
1080 # which have to be executed to fulfill the query: according |
1084 # to permissions for variable's type, different rql queries may have to |
1081 # to permissions for variable's type, different rql queries may have to |
1085 # be executed |
1082 # be executed |
1086 plan.preprocess(rqlst) |
1083 plan.preprocess(rqlst) |
|
1084 if server.DEBUG & server.DBG_MS: |
|
1085 print '-'*80 |
|
1086 print 'PLANNING', rqlst |
1087 ppis = [PartPlanInformation(plan, select, self.rqlhelper) |
1087 ppis = [PartPlanInformation(plan, select, self.rqlhelper) |
1088 for select in rqlst.children] |
1088 for select in rqlst.children] |
1089 steps = self._union_plan(plan, ppis) |
1089 steps = self._union_plan(plan, ppis) |
1090 if server.DEBUG & server.DBG_MS: |
1090 if server.DEBUG & server.DBG_MS: |
1091 from pprint import pprint |
1091 from pprint import pprint |