title: spark unix_timestamp data type mismatch
body: <p>Could someone help guide me in what data type or format I need to submit from_unixtime for the spark from_unixtime() function to work?</p>
  
  <p>When I try the following it works, but responds not with current_timestamp.</p>
  
  <pre><code>from_unixtime(current_timestamp())
  </code></pre>
  
  <p>The response is below:</p>
  
  <pre><code>fromunixtime(currenttimestamp(),yyyy-MM-dd HH:mm:ss)
  </code></pre>
  
  <p>When I try to input</p>
  
  <pre><code>from_unixtime(1392394861,"yyyy-MM-dd HH:mm:ss.SSSS")
  </code></pre>
  
  <p>The above simply fails with a type mismatch:</p>
  
  <blockquote>
    <p>error: type mismatch;
     found   : Int(1392394861)
     required: org.apache.spark.sql.Column
                  from_unixtime(1392394861,"yyyy-MM-dd HH:mm:ss.SSSS")</p>
  </blockquote>
  
  <p>What am I missing? I've tried a number of different things and tried reading documentation on using date/time in spark and every example I've tried fails with type mismatches.</p>