title: Error Code: 38 DB::Exception: Cannot parse date: value is too short: Cannot parse Date from String:while executing 'FUNCTION toDate()'
body: <p>When I am using this query:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT
      store_id,
      toDate(concat(year, '-', month, '-', day)) AS date,
      COUNTDistinct(session_id) AS visits
  FROM s3data.visits_parquet_improved
  WHERE isNotNull(session_id) AND ((toDate(concat(year, '-', month, '-', day)) &gt;= toDate('2021-06-23')) AND (toDate(concat(year, '-', month, '-', day)) &lt;= toDate('2021-06-24')))
  GROUP BY
      store_id,
      year,
      month,
      day
  ORDER BY
      year ASC,
      month ASC,
      day ASC
  </code></pre>
  <p>return this error:</p>
  <pre><code>Received exception from server (version 21.7.4):
  Code: 38. DB::Exception: Received from localhost:9000. DB::Exception: Cannot parse date: 
  value is too short: Cannot parse Date from String: while executing 
  'FUNCTION toDate(concat(year, '-', month, '-', day) :: 9) -&gt; toDate(concat(year, '-', month, '-', day)) Date : 5'.
  </code></pre>
  <p>Does someone know why and how to fix it?</p>