diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala index 9221668f5fb93..5dab39e34bd10 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala @@ -4370,7 +4370,10 @@ object SQLConf { val LEGACY_PERCENTILE_DISC_CALCULATION = buildConf("spark.sql.legacy.percentileDiscCalculation") .internal() - .doc("If true the old bogus percentile_disc calculation is used.") + .doc("If true, the old bogus percentile_disc calculation is used. The old calculation " + + "incorrectly mapped the requested percentile to the sorted range of values in some cases " + + "and so returned incorrect results. Also, the new implementation is faster as it doesn't " + + "contain the interpolation logic that the old percentile_cont based one did.") .version("4.0.0") .booleanConf .createWithDefault(false)