title: join spark dataframes rows order
body: <p>I am playing with spark dataframes joining and I notice that when using join with dataframes API the order of rows changes. 
  Below is the example I am working on : </p>
  
  <pre><code>val df = sc.parallelize(Array((0, 1.0, 0.4, 0.1),
                                 (1, 0.9, 0.3, 0.3),
                                 (2, 0.2, 0.9, 0.2),
                                 (3, 0.9, 0.2, 0.2)))
                                 .toDF("id2", "prop1", "prop2", "prop3")
  
  val df2 = sc.parallelize(Array((0, 3.0, 0.2, 0.1),
                                 (1, 0.9, 0.3, 0.3),
                                 (2, 0.2, 0.5, 0.2),
                                 (3, 0.8, 0.1, 0.1),
                                 (4, 0.3, 0.5, 0.5)))
                                 .toDF("id", "prop1_2", "prop2_2", "prop3_2")
  val joined = df2.join(df, df("id2")===df2("id"), "outer")
  
  
  
  joined.show()
  
  id|prop1_2|prop2_2|prop3_2| id2|prop1|prop2|prop3|
  +---+-------+-------+-------+----+-----+-----+-----+
  |  1|    0.9|    0.3|    0.3|   1|  0.9|  0.3|  0.3|
  |  3|    0.8|    0.1|    0.1|   3|  0.9|  0.2|  0.2|
  |  4|    0.3|    0.5|    0.5|null| null| null| null|
  |  2|    0.2|    0.5|    0.2|   2|  0.2|  0.9|  0.2|
  |  0|    3.0|    0.2|    0.1|   0|  1.0|  0.4|  0.1|
  </code></pre>
  
  <p>May you please give me any tricks to avoid this. 
  I am not sure if I use datasets API instead of dataframes API  I can avoid this issue. </p>