title: Add Number of days column to Date Column in same dataframe for Spark Scala App
body: <p>I have a <code>dataframe</code> df of <code>columns</code> <code>("id", "current_date", "days")</code> and I am trying to add the the "<code>days</code>" to "<code>current_date</code>" and create a new <code>dataframe</code> with new <code>column</code> called "<code>new_date</code>" using spark scala function <code>date_add()</code></p>
  
  <pre><code>val newDF = df.withColumn("new_Date", date_add(df("current_date"), df("days").cast("Int")))
  </code></pre>
  
  <p>But looks like the function <code>date_add</code> only accepts <code>Int</code> values and not <code>columns</code>. How can get the desired output in such case? Are there any alternative functions i can use to get the desired output? </p>
  
  <p>spark version: 1.6.0
  scala version: 2.10.6</p>