Skip to content
Snippets Groups Projects
Commit c0461bf2bf24 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

we may have to cleanup solutions when we've no rewritten const (that doesn't...

we may have to cleanup solutions when we've no rewritten const (that doesn't mean nothing changed...)
parent 3d89e70448af
No related branches found
No related tags found
No related merge requests found
......@@ -128,6 +128,7 @@
for subquery in select.with_:
for select in subquery.query.children:
self._simplify(select)
rewritten = False
for var in select.defined_vars.values():
stinfo = var.stinfo
if stinfo['constnode'] and not stinfo['blocsimplification']:
......@@ -176,5 +177,6 @@
rhs = copy_uid_node(select, rhs, vconsts)
vref.parent.replace(vref, rhs)
del select.defined_vars[var.name]
rewritten = True
if vconsts:
select.stinfo['rewritten'][var.name] = vconsts
......@@ -179,6 +181,6 @@
if vconsts:
select.stinfo['rewritten'][var.name] = vconsts
if select.stinfo['rewritten'] and select.solutions:
if rewritten and select.solutions:
select.clean_solutions()
def compare(self, rqlstring1, rqlstring2):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment