code: func (b *builtinTruncateDecimalSig) evalDecimal(row chunk.Row) (*types.MyDecimal, bool, error) {
  	x, isNull, err := b.args[0].EvalDecimal(b.ctx, row)
  	if isNull || err != nil {
  		return nil, isNull, err
  	}
  
  	d, isNull, err := b.args[1].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return nil, isNull, err
  	}
  
  	result := new(types.MyDecimal)
  	if err := x.Round(result, mathutil.Min(int(d), b.getRetTp().Decimal), types.ModeTruncate); err != nil {
  		return nil, true, err
  	}
  	return result, false, nil
  }
docs: // evalDecimal evals a TRUNCATE(X,D).
  // See https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_truncate