title: how to fill empty dates in Spark?
body: <p>I have an order table, I can sum daily order accumulate amount like below:</p>
  
  <pre><code>date    amount
  
  2017/5/1    1000
  
  2017/5/5    2000
  </code></pre>
  
  <p>but i want to get :</p>
  
  <pre><code>date    amount
  
  2017/5/1    1000
  
  2017/5/2    1000
  
  2017/5/3    1000
  
  2017/5/4    1000
  
  2017/5/5    2000
  </code></pre>
  
  <p>there is no order between <strong>2017-05-02</strong> and <strong>2017-05-04</strong>,so the amount stays 1000.How can i do this ?</p>