should not simplify previous to preprocess
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 22 Dec 2009 13:16:17 +0100
changeset 4184 7002e91d304a
parent 4183 b5aa030bb2f9
child 4186 ca7e526b07b6
should not simplify previous to preprocess
devtools/repotest.py
--- a/devtools/repotest.py	Tue Dec 22 13:14:34 2009 +0100
+++ b/devtools/repotest.py	Tue Dec 22 13:16:17 2009 +0100
@@ -174,17 +174,18 @@
         rqlhelper._analyser.uid_func_mapping = {}
         return rqlhelper
 
-    def _prepare_plan(self, rql, kwargs=None):
+    def _prepare_plan(self, rql, kwargs=None, simplify=True):
         rqlhelper = self._rqlhelper()
         rqlst = rqlhelper.parse(rql)
         rqlhelper.compute_solutions(rqlst, kwargs=kwargs)
-        rqlhelper.simplify(rqlst)
+        if simplify:
+            rqlhelper.simplify(rqlst)
         for select in rqlst.children:
             select.solutions.sort()
         return self.o.plan_factory(rqlst, kwargs, self.session)
 
     def _prepare(self, rql, kwargs=None):
-        plan = self._prepare_plan(rql, kwargs)
+        plan = self._prepare_plan(rql, kwargs, simplify=False)
         plan.preprocess(plan.rqlst)
         rqlst = plan.rqlst.children[0]
         rqlst.solutions = remove_unused_solutions(rqlst, rqlst.solutions, {}, self.repo.schema)[0]