File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -405,6 +405,18 @@ func (scs *selectClausesSuite) TestGroupByAppend() {
405405 scs .Equal (exp .NewColumnListExpression (g , g2 ), c2 .GroupBy ())
406406}
407407
408+ func (scs * selectClausesSuite ) TestGroupByAppend_NoPreviousGroupBy () {
409+ g := exp .NewColumnListExpression (exp .NewIdentifierExpression ("" , "" , "a" ))
410+ g2 := exp .NewColumnListExpression (exp .NewIdentifierExpression ("" , "" , "b" ))
411+
412+ c := exp .NewSelectClauses ().GroupByAppend (g )
413+ c2 := c .GroupByAppend (g2 )
414+
415+ scs .Equal (g , c .GroupBy ())
416+
417+ scs .Equal (exp .NewColumnListExpression (g , g2 ), c2 .GroupBy ())
418+ }
419+
408420func (scs * selectClausesSuite ) TestSetGroupBy () {
409421 g := exp .NewColumnListExpression (exp .NewIdentifierExpression ("" , "" , "a" ))
410422 g2 := exp .NewColumnListExpression (exp .NewIdentifierExpression ("" , "" , "b" ))
You can’t perform that action at this time.
0 commit comments