title: How to get the Integer value of a column in .withColumn function? [Spark - Scala]
body: <p>I need to use <code>date_add()</code> function to add 90 days to a dataframe's column. The function works correctly, but only when I hardcode the 90. If the number is in another column and I refer it, the function asks me for an integer to work.</p>
  
  <p>This code works:</p>
  
  <pre><code>.withColumn("DATE_SUM_COLUMN",date_add(col("DATE_COLUMN"),90))
  </code></pre>
  
  <p>This code does not:</p>
  
  <pre><code>.withColumn("DATE_SUM_COLUMN",date_add(col("DATE_COLUMN"),col("number")))
  </code></pre>
  
  <p>Thanks.</p>