From 3779a1de81531d5a201faf652560333fd4b670ef Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Fri, 15 Apr 2016 14:56:09 +0200 Subject: [PATCH] Remove useless joins in optimization Along with removing intersections and unions, this removes useless joins in the same function. --- relational/optimizations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relational/optimizations.py b/relational/optimizations.py index c637fbf..5e03465 100644 --- a/relational/optimizations.py +++ b/relational/optimizations.py @@ -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)