问题 I am trying to do a percentile over a column using a Window function as below. I have referred here to use the ApproxQuantile definition over a group. val df1 = Seq( (1, 10.0), (1, 20.0), (1, 40.6), (1, 15.6), (1, 17.6), (1, 25.6), (1, 39.6), (2, 20.5), (2 ,70.3), (2, 69.4), (2, 74.4), (2, 45.4), (3, 60.6), (3, 80.6), (4, 30.6), (4, 90.6) ).toDF("ID","Count") val idBucketMapping = Seq((1, 4), (2, 3), (3, 2), (4, 2)) .toDF("ID", "Bucket") //jpp import org.apache.spark.sql.Column import org