title: Get ISO year week in Apache Spark using scala / from_unixtime behaving differently in Spark and Hive
body: <p>I am trying to get ISO year week in Spark with scala from a date which is in string format.</p>
  
  <p>The following SQL query returns the expected result in hive.<br>
  i.e if the date is 1st January 2016, as per ISO standard it is 53rd week of year 2015 and hence the result <strong>201553</strong>.</p>
  
  <pre><code>hive&gt; select from_unixtime(unix_timestamp('20160101', 'yyyyMMdd'), 'Yww');
  OK
  201553
  Time taken: 0.444 seconds, Fetched: 1 row(s)
  </code></pre>
  
  <p>If I try to run the same in Spark via Spark sql, it is giving me a different result.</p>
  
  <pre><code>scala&gt; spark.sql("""select from_unixtime(unix_timestamp('20160101', 'yyyyMMdd'), 'Yww')""").show
  +------------------------------------------------------+
  |from_unixtime(unix_timestamp(20160101, yyyyMMdd), Yww)|
  +------------------------------------------------------+
  |                                                201601|
  +------------------------------------------------------+
  </code></pre>
  
  <p>The result I need from Spark program in <strong>201553</strong>.<br>
  I am using Spark version 2.3<br>
  Can someone explain what's going on?<br>
  Please let me know if there is any way to get ISO year week in Spark.</p>