title: In spark join, does table order matter like in pig?
body: <p>Related to <a href="https://stackoverflow.com/questions/26992856/spark-joining-2-pairrdd-elements">Spark - Joining 2 PairRDD elements</a></p>
  
  <p>When doing a regular join in pig, the last table in the join is not brought into memory but streamed through instead, so if A has small cardinality per key and B large cardinality, it is significantly better to do <code>join A, B</code> than <code>join A by B</code>, from performance perspective (avoiding spill and OOM)</p>
  
  <p>Is there a similar concept in spark? I didn't see any such recommendation, and wonder how is it possible? The implementation looks to me pretty much the same as in pig: <a href="https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/rdd/CoGroupedRDD.scala" rel="nofollow noreferrer">https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/rdd/CoGroupedRDD.scala</a></p>
  
  <p>Or am I missing something?</p>