title: should we use groupBy on dataframe or reduceBy
body: <p>While <code>groupBy</code> the dataframe in apache spark and later using aggregation with another column in the dataframe. Is there any performance issue? Can <code>reduceBy</code> be a better option?</p>
  
  <pre><code>df.groupBy("primaryKey").agg(max("another column"))
  </code></pre>