@@ -42,7 +42,7 @@ import org.apache.spark.sql.types._
4242 * a array of percentage values. Each percentage value must be between
4343 * 0.0 and 1.0.
4444 * @param accuracyExpression Integer literal expression of approximation accuracy. Higher value
45- * yield better accuracy, the default value is
45+ * yields better accuracy, the default value is
4646 * DEFAULT_PERCENTILE_ACCURACY.
4747 */
4848@ ExpressionDescription (
@@ -51,14 +51,14 @@ import org.apache.spark.sql.types._
5151 _FUNC_(col, percentage [, accuracy]) - Returns the approximate percentile value of numeric
5252 column `col` at the given percentage. The value of percentage must be between 0.0
5353 and 1.0. The `accuracy` parameter (default: 10000) is a positive integer literal which
54- controls approximation accuracy at the cost of memory. Higher value of `accuracy` yield
54+ controls approximation accuracy at the cost of memory. Higher value of `accuracy` yields
5555 better accuracy, `1.0/accuracy` is the relative error of the approximation.
5656
5757 _FUNC_(col, array(percentage1 [, percentage2]...) [, accuracy]) - Returns the approximate
5858 percentile array of column `col` at the given percentage array. Each value of the
5959 percentage array must be between 0.0 and 1.0. The `accuracy` parameter (default: 10000) is
6060 a positive integer literal which controls approximation accuracy at the cost of memory.
61- Higher value of `accuracy` yield better accuracy, `1.0/accuracy` is the relative error of
61+ Higher value of `accuracy` yields better accuracy, `1.0/accuracy` is the relative error of
6262 the approximation.
6363 """ )
6464case class ApproximatePercentile (
@@ -92,7 +92,7 @@ case class ApproximatePercentile(
9292 case (_, num : Double ) => (false , Array (num))
9393 case (ArrayType (baseType : NumericType , _), arrayData : ArrayData ) =>
9494 val numericArray = arrayData.toObjectArray(baseType)
95- (true , numericArray.map {x =>
95+ (true , numericArray.map { x =>
9696 baseType.numeric.toDouble(x.asInstanceOf [baseType.InternalType ])
9797 })
9898 case other =>
0 commit comments