diff --git a/CHANGELOG b/CHANGELOG index 62ae4b7..8c3decc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ - Add new class of tests for queries that are supposed to fail - Changes to make failures in commutative operators commutative too - Added new optimization to remove useless joins +- Correct optimization over selection and product 2.4 - Improve error reporting diff --git a/relational/optimizations.py b/relational/optimizations.py index 5e03465..8191a8c 100644 --- a/relational/optimizations.py +++ b/relational/optimizations.py @@ -573,7 +573,7 @@ def selection_and_product(n, rels): i contains attributes belonging to Q and l contains attributes belonging to both''' changes = 0 - if n.name == SELECTION and n.child.name in (PRODUCT, JOIN, JOIN_LEFT, JOIN_RIGHT, JOIN_FULL): + if n.name == SELECTION and n.child.name in (PRODUCT, JOIN): l_attr = n.child.left.result_format(rels) r_attr = n.child.right.result_format(rels)