Exemple #1
0
 def test_query_simple(self):
     s=Scheduler()
     csv = CSVLoader(get_dataset('bigfile'), index_col=False,header=None,force_valid_ids=True,scheduler=s)
     q=Select(scheduler=s)
     q.input.df = csv.output.df
     prlen = Every(constant_time=True, scheduler=s)
     prlen.input.df = q.output.df
     s.start()
     self.assertEqual(len(q.df()), 1000000)
Exemple #2
0
 def test_query(self):
     s=Scheduler()
     csv = CSVLoader(get_dataset('bigfile'), index_col=False,header=None,force_valid_ids=True,scheduler=s)
     cst=Constant(pd.DataFrame({'query': ['_1 < 0.5']}),scheduler=s)
     q=Select(scheduler=s)
     q.input.df = csv.output.df
     q.input.query = cst.output.df
     prlen = Every(constant_time=True, scheduler=s)
     prlen.input.df = q.output.df
     s.start()
     self.assertTrue(len(q.df()) < 1000000)