def test_push_work_into_sql_2(self):
        """Test generation of MyriaQueryScan operator for query with projects
        and a filter"""
        query = """
        r3 = scan({x});
        intermediate = select a, c from r3 where b < 5;
        store(intermediate, OUTPUT);
        """.format(x=self.x_key)

        pp = self.get_physical_plan(query, push_sql=True)
        self.assertEquals(self.get_count(pp, Operator), 2)
        self.assertTrue(isinstance(pp.input, MyriaQueryScan))

        expected = collections.Counter([(a, c)
                                        for (a, b, c) in self.x_data
                                        if 5 < b])

        self.db.evaluate(pp)
        result = self.db.get_table('OUTPUT')
        self.assertEquals(result, expected)
dataset/ETHPy150Open uwescience/raco/raco/myrial/optimizer_tests.py/OptimizerTest.test_push_work_into_sql_2/swapped operands of `<`