title: groupByKey vs repartition performance
body: <p>When I do a </p>
  
  <pre><code>df.groupByKey("&lt;column&gt;").mapGroups((key,value) =&gt; myfunction(value))
  
  vs
  
  df.repartition("&lt;column&gt;").mapPartitions(...)
  </code></pre>
  
  <p>Would like to know which is more efficient when applied on a large <code>DataFrames</code>? What I know is both results in shuffle but repartition will make sure that data related to partitioned column will always be together on one worker node. Correct me if I'm wrong.</p>