Skip to content

Commit a927d78

Browse files
committed
Add test to cover group by alias with column without alias
1 parent 5288f55 commit a927d78

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/tests/test_select.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ def test_select_group_by(self):
213213
'GROUP BY 2')
214214
self.assertEqual(tuple(query.params), ())
215215

216+
query = self.table.select(column, group_by=output)
217+
self.assertEqual(str(query),
218+
'SELECT "a"."c" FROM "t" AS "a" GROUP BY "c1"')
219+
self.assertEqual(tuple(query.params), ())
220+
216221
def test_select_group_by_grouping_sets(self):
217222
query = self.table.select(
218223
Literal('*'),

0 commit comments

Comments
 (0)