What is the difference between sort and orderBy functions in Spark
<p>What is the difference between sort and orderBy spark DataFrame?</p>

<pre><code>scala&gt; zips.printSchema
root
 |-- _id: string (nullable = true)
 |-- city: string (nullable = true)
 |-- loc: array (nullable = true)
 |    |-- element: double (containsNull = true)
 |-- pop: long (nullable = true)
 |-- state: string (nullable = true)
</code></pre>

<p>Below commands produce same result:</p>

<pre><code>zips.sort(desc("pop")).show
zips.orderBy(desc("pop")).show
</code></pre>