Пример #1
0
 def test_dcount(self):
     self.assertEqual(
         " | summarize dcount(stringField)",
         Query().summarize(f.dcount(t.stringField)).render()
     )
     acc = 0.1
     self.assertEqual(
         " | summarize dcount(numField, 0.1)",
         Query().summarize(f.dcount(t.numField, acc)).render()
     )
Пример #2
0
 def test_nesting(self):
     self.assertEqual(
         " | summarize active_days = dcount(bin(dateField, time(1.0:0:0.0)))",
         Query().summarize(active_days=f.dcount(f.bin(t.dateField, timedelta(1)))).render()
     )