title: Applying approxQuantile on a window in Scala (Spark dataframe)
body: <p>As I understand, one can obtain quantiles with
      df.stat.approxQuantile</p>
  
  <p>Is it possible to calculate quantiles on a window partitioned by a certain column? </p>
  
  <p>Since, I am looking to obtain specific quantiles, the method percent_rank() - method that can be applied on a window - does not accomplish this.</p>