code: func builtinRand(args []types.Datum, ctx context.Context) (d types.Datum, err error) {
  	if len(args) == 1 && !args[0].IsNull() {
  		seed, err := args[0].ToInt64(ctx.GetSessionVars().StmtCtx)
  		if err != nil {
  			return d, errors.Trace(err)
  		}
  		rand.Seed(seed)
  	}
  	d.SetFloat64(rand.Float64())
  	return d, nil
  }
docs: // See http://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_rand