I have this test data:
val data = List( List(47.5335D), List(67.5335D), List(69.5335D), List(444.1235D), List(677.53
I encountered this similar problem when trying to use the approxQuantile() method with Spark-2.2.1. When I upgraded to Spark-2.4.3, approxQuantile() now returns the right exact median.
Spark-2.2.1
Spark-2.4.3