Remove useless joins in optimization

Along with removing intersections and unions, this
removes useless joins in the same function.
master
Salvo 'LtWorf' Tomaselli 2016-04-15 14:56:09 +07:00
parent a5aef4a0fe
commit 3779a1de81
1 changed files with 1 additions and 1 deletions

@ -133,7 +133,7 @@ def futile_union_intersection_subtraction(n):
changes = 0
# Union and intersection of the same thing
if n.name in (UNION, INTERSECTION) and n.left == n.right:
if n.name in (UNION, INTERSECTION, JOIN, JOIN_LEFT, JOIN_RIGHT, JOIN_FULL) and n.left == n.right:
changes = 1
replace_node(n, n.left)