i need to reduce sets, so i need selection pushed down in each case
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@143 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
723c63641d
commit
88efcf0b78
@ -46,11 +46,7 @@ def duplicated_select(n):
|
|||||||
def down_to_unions_subtractions_intersections(n):
|
def down_to_unions_subtractions_intersections(n):
|
||||||
'''This funcion locates things like σ i==2 (c ᑌ d), where the union
|
'''This funcion locates things like σ i==2 (c ᑌ d), where the union
|
||||||
can be a subtraction and an intersection and replaces them with
|
can be a subtraction and an intersection and replaces them with
|
||||||
σ i==2 (c) ᑌ σ i==2(d).
|
σ i==2 (c) ᑌ σ i==2(d).
|
||||||
|
|
||||||
If the operator is not Union and the right expression is a relation,
|
|
||||||
the resulting expression will be: σ i==2 (c) - d.
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
changes=0
|
changes=0
|
||||||
_o=('ᑌ','-','ᑎ')
|
_o=('ᑌ','-','ᑎ')
|
||||||
@ -61,14 +57,11 @@ def down_to_unions_subtractions_intersections(n):
|
|||||||
left.name=n.name
|
left.name=n.name
|
||||||
left.child=n.child.left
|
left.child=n.child.left
|
||||||
left.kind=optimizer.UNARY
|
left.kind=optimizer.UNARY
|
||||||
if n.child.name=='ᑌ' or n.child.right.kind!=optimizer.RELATION:
|
right=optimizer.node()
|
||||||
right=optimizer.node()
|
right.prop=n.prop
|
||||||
right.prop=n.prop
|
right.name=n.name
|
||||||
right.name=n.name
|
right.child=n.child.right
|
||||||
right.child=n.child.right
|
right.kind=optimizer.UNARY
|
||||||
right.kind=optimizer.UNARY
|
|
||||||
else:
|
|
||||||
right=n.child.right
|
|
||||||
|
|
||||||
n.name=n.child.name
|
n.name=n.child.name
|
||||||
n.left=left
|
n.left=left
|
||||||
|
Loading…
Reference in New Issue
Block a user