title: Would Spark preserve key order with this sortByKey/map/collect sequence?
body: <p>Let us say, we have this.</p>
  
  <pre><code>val sx = sc.parallelize(Array((0, 39), (4, 47), (3, 51), (1, 98), (2, 61)))
  </code></pre>
  
  <p>And we later call this.</p>
  
  <pre><code>val sy = sx.sortByKey(true)
  </code></pre>
  
  <p>Which would make </p>
  
  <pre><code>sy = RDD[(0, 39), (1, 98), (2, 61), (3, 51), (4, 47)] 
  </code></pre>
  
  <p>And then we do </p>
  
  <pre><code>collected = sy.map(x =&gt; (x._2 / 10, x._2)).collect
  </code></pre>
  
  <p>Would we always get the following. I mean, would the original key order be preserved, despite changing the key values?</p>
  
  <pre><code>collected = [(3, 39), (9, 98), (6, 61), (5, 51), (4, 47)]
  </code></pre>