title: Get consecutive t date range for each id in hive
body: <p>I have a table with data like :</p>
  
  <pre><code>col1  col2
  1      2020-01-15
  1      2020-01-16
  1      2020-01-17
  1      2020-01-18
  1      2020-01-20
  2      2020-01-09
  2      2020-01-10
  2      2020-01-15
  </code></pre>
  
  <p>and I want output something like this</p>
  
  <pre><code>col1    min         max
  1      2020-01-15  2020-01-18
  1      2020-01-20  2020-01-20
  2      2020-01-09  2020-01-10
  2      2020-01-15  2020-01-15
  </code></pre>
  
  <p>As you can see for each Id I need date range for each consecutive ate chunk and if there is only one date then minmax will be same</p>