Skip to content

Commit

Permalink
test: add failing test and ensure it passes after the changes
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed Apr 3, 2024
1 parent 1e8a428 commit ca78415
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ func TestAggregateTypes(t *testing.T) {
mcmp.SkipIfBinaryIsBelowVersion(19, "vtgate")
mcmp.AssertMatches("select avg(val1) from aggr_test", `[[FLOAT64(0)]]`)
})
mcmp.Run("Average with group by without selecting the grouped columns", func(mcmp *utils.MySQLCompare) {
mcmp.SkipIfBinaryIsBelowVersion(20, "vtgate")
mcmp.AssertMatches("select avg(val2) from aggr_test group by val1 order by val1", `[[DECIMAL(1.0000)] [DECIMAL(1.0000)] [DECIMAL(3.5000)] [NULL] [DECIMAL(1.0000)]]`)
})
}

func TestGroupBy(t *testing.T) {
Expand Down

0 comments on commit ca78415

Please sign in to comment.