Skip to content

Commit

Permalink
remove unnecessary change after pingcap#7792
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Sep 27, 2018
1 parent 2d934b6 commit a50d975
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions expression/aggregation/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ func (a *AggFuncDesc) typeInfer4Sum(ctx sessionctx.Context) {
if a.RetTp.Decimal < 0 || a.RetTp.Decimal > mysql.MaxDecimalScale {
a.RetTp.Decimal = mysql.MaxDecimalScale
}
a.RetTp.Flag |= a.Args[0].GetType().Flag & mysql.UnsignedFlag
// TODO: a.Args[0] = expression.WrapWithCastAsDecimal(ctx, a.Args[0])
case mysql.TypeDouble, mysql.TypeFloat:
a.RetTp = types.NewFieldType(mysql.TypeDouble)
Expand All @@ -322,7 +321,6 @@ func (a *AggFuncDesc) typeInfer4Avg(ctx sessionctx.Context) {
} else {
a.RetTp.Decimal = mathutil.Min(a.Args[0].GetType().Decimal+types.DivFracIncr, mysql.MaxDecimalScale)
}
a.RetTp.Flag |= a.Args[0].GetType().Flag & mysql.UnsignedFlag
a.RetTp.Flen = mysql.MaxDecimalWidth
// TODO: a.Args[0] = expression.WrapWithCastAsDecimal(ctx, a.Args[0])
case mysql.TypeDouble, mysql.TypeFloat:
Expand Down

0 comments on commit a50d975

Please sign in to comment.