title: What happens when we do a repartition on a dataframe that is already repartitioned?
body: <p>I was analysing a developed code. I found something like this.</p>
  
  <pre><code>val newDF = df.repartition(1).withColumn("name", lit("xyz")).orderBy(col("count").asc)
  </code></pre>
  
  <p>Later at a different module, this <code>newDF</code> was reused as below</p>
  
  <pre><code>newDF.repartition(1).write.format("csv").save(path/of/file)
  </code></pre>
  
  <p>Now my doubt is, since the same dataframe is repartitioned in 2 places - that too with an <code>orderby</code> in place for the first Dataframe - Will the data not get shuffled after the second repartition which makes orderBy void ?</p>