def test_verticaoracle_func_one_groupby(self): q = (Query.from_(self.table).select(self.table.foo, fn.Sum(self.table.bar)).groupby( Rollup(self.table.foo))) self.assertEqual( 'SELECT "foo",SUM("bar") FROM "abc" GROUP BY ROLLUP("foo")', str(q))
def test_verticaoracle_func_partial(self): q = Query.from_(self.table).select(self.table.foo, self.table.fiz, self.table.buz, fn.Sum(self.table.bar)).groupby( Rollup( self.table.foo, self.table.fiz, ), self.table.buz, ) self.assertEqual( 'SELECT "foo","fiz","buz",SUM("bar") FROM "abc" GROUP BY ROLLUP("foo","fiz"),"buz"', str(q))