now handles more than 2 nested selections

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@137 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2009-04-29 07:25:39 +07:00
parent a4325679cb
commit 4ba7209964
2 changed files with 2 additions and 1 deletions

@ -30,6 +30,7 @@ def duplicated_select(n):
if n.prop != n.child.prop: #Nested but different, joining them
n.prop = n.prop + " and " + n.child.prop
n.child=n.child.child
duplicated_select(n)
#recoursive scan
if n.kind==optimizer.UNARY:

@ -177,7 +177,7 @@ if __name__=="__main__":
#a= tokenize("(a - (a b) * π a,b (a-b)) - ρ 123 (a)")
#a= tokenize(u"π a,b (a*b)")
#a=tokenize("(a-b*c)*(b-c)")
a=general_optimize("σ b>5 ( σ a>2 (C)) * σ a>2 ( σ a>2 (C))")
a=general_optimize("σ i==2 (σ b>5 ( σ a>2 (C))) * σ a>2 ( σ a>2 (C))")
print a
#print node(a)
#print tokenize("(a)")