COUNT() function in select should return an int (#7243)

This commit is contained in:
Aditya Manthramurthy 2019-02-13 16:32:59 -08:00 committed by kannappanr
parent 6d778a883f
commit 8a405cab2f

View File

@ -277,7 +277,7 @@ func (e *FuncExpr) aggregateRow(r Record) error {
func (e *FuncExpr) getAggregate() (*Value, error) {
switch e.getFunctionName() {
case aggFnCount:
return FromFloat(float64(e.aggregate.runningCount)), nil
return FromInt(e.aggregate.runningCount), nil
case aggFnAvg:
if e.aggregate.runningCount == 0 {