From 4b54d181c1ae99ad1c2a7daeb431dc8575d9505f Mon Sep 17 00:00:00 2001 From: Zach Musgrave Date: Thu, 18 Mar 2021 18:33:03 -0700 Subject: [PATCH] Fixed broken test caused by changing group by behavior, for the case when a group by expression isn't in the select list. --- integration-tests/bats/sql.bats | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/integration-tests/bats/sql.bats b/integration-tests/bats/sql.bats index 050a8dd278..241c00b554 100755 --- a/integration-tests/bats/sql.bats +++ b/integration-tests/bats/sql.bats @@ -717,16 +717,12 @@ SQL [[ "$output" =~ " 5 " ]] || false [[ "$output" =~ " 0 " ]] || false [[ ! "$output" =~ " 4 " ]] || false - run dolt sql -q "select max(pk),c2 from one_pk group by c1" - [ $status -eq 1 ] - [[ "$output" =~ "doesn't appear in the grouping columns" ]] || false - skip "group by behavior is inconsistent" - run dolt sql -q "select max(pk),c2 from one_pk group by c1 limit 1" - [ $status -eq 1 ] - [[ "$output" =~ "doesn't appear in the grouping columns" ]] || false - run dolt sql -q "select max(pk) as broke_group_by, c2 from one_pk group by c1" - [ $status -eq 1 ] - [[ "$output" =~ "doesn't appear in the grouping columns" ]] || false + run dolt sql -r csv -q "select max(pk),c2 from one_pk group by c1" + [ $status -eq 0 ] + [[ "$output" =~ "5,0" ]] || false + [[ "$output" =~ "1,10" ]] || false + [[ "$output" =~ "2,20" ]] || false + [[ "$output" =~ "3,30" ]] || false } @test "sql: substr() and cast() functions" {