title: Scala repartition cannot resolve symbol
body: <p>I am trying to save my dataframe aa parquet file with one partition per day. So trying to use the date column. However, I want to write one file per partition, so using <code>repartition($"date")</code>, but keep getting errors:</p>
  
  <p>This error <code>"cannot resolve symbol repartition"</code> and <code>"value $ is not a member of stringContext"</code> when I use,</p>
  
  <pre><code>DF.repartition($"date")
    .write
    .mode("append")
    .partitionBy("date")
    .parquet("s3://file-path/")
  </code></pre>
  
  <p>This error <code>Type mismatch, expected column, actual string,</code> when I use:</p>
  
  <pre><code>DF.repartition("date")
    .write
    .mode("append")
    .partitionBy("date")
    .parquet("s3://file-path/")
  </code></pre>
  
  <p>However, this works fine without any error.</p>
  
  <pre><code>DF.write.mode("append").partitionBy("date").parquet("s3://file-path/")
  </code></pre>
  
  <p>Cant we use date type in repartition? Whats wrong here?</p>