def test_cross_plus_selection_becomes_join(self):
        with open('examples/reachable.myl') as fh:
            query = fh.read()

        def plan_contains_cross(plan):
            def f(op):
                if isinstance(op, raco.algebra.CrossProduct) and not \
                   isinstance(op.left, raco.algebra.SingletonRelation):
                    yield True

            return any(plan.postorder(f))

        statements = self.parser.parse(query)
        self.processor.evaluate(statements)

        lp = self.processor.get_logical_plan()
        self.assertTrue(plan_contains_cross(lp))

        pp = self.processor.get_physical_plan()
        self.assertFalse(plan_contains_cross(pp))
Test that the optimizer compiles away cross-products.
dataset/ETHPy150Open uwescience/raco/raco/myrial/reachable_tests.py/ReachableTest.test_cross_plus_selection_becomes_join