Count(*) to give integer value (#6564)

The Max, Min functions were giving float value even when they were integers.  
Resolved max and Min to return integers in that scenario.

Fixes #6472
This commit is contained in:
Ashish Kumar Sinha
2018-10-05 06:03:53 +05:30
committed by kannappanr
parent f187a16962
commit 670f9788e3
2 changed files with 19 additions and 4 deletions

View File

@@ -368,8 +368,11 @@ func TestToStringAgg(t *testing.T) {
myAggVal []float64
expected string
}{
{[]float64{10, 11, 12, 13, 14}, "10.000000,11.000000,12.000000,13.000000,14.000000"},
{[]float64{10}, "10.000000"},
{[]float64{10, 11, 12, 13, 14}, "10,11,12,13,14"},
{[]float64{10, 11.3, 12, 13, 14}, "10,11.300000,12,13,14"},
{[]float64{10.235, 11.3, 12, 13, 14}, "10.235000,11.300000,12,13,14"},
{[]float64{10.235, 11.3, 12.123, 13.456, 14.789}, "10.235000,11.300000,12.123000,13.456000,14.789000"},
{[]float64{10}, "10"},
}
for _, table := range tables {
val := s3s.aggFuncToStr(table.myAggVal)