code: func (b *builtinDateSig) evalTime(row chunk.Row) (types.Time, bool, error) {
  	expr, isNull, err := b.args[0].EvalTime(b.ctx, row)
  	if isNull || err != nil {
  		return types.Time{}, true, handleInvalidTimeError(b.ctx, err)
  	}
  
  	if expr.IsZero() {
  		return types.Time{}, true, handleInvalidTimeError(b.ctx, types.ErrIncorrectDatetimeValue.GenWithStackByArgs(expr.String()))
  	}
  
  	expr.Time = types.FromDate(expr.Time.Year(), expr.Time.Month(), expr.Time.Day(), 0, 0, 0, 0)
  	expr.Type = mysql.TypeDate
  	return expr, false, nil
  }
docs: // evalTime evals DATE(expr).
  // See https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date