From 7c16827a2ecc5dcfeaa98e17aec66b882c5e0a87 Mon Sep 17 00:00:00 2001 From: Kazuaki Ishizaki Date: Thu, 30 Jan 2020 21:58:36 +0900 Subject: [PATCH 1/2] update description --- .../catalyst/expressions/higherOrderFunctions.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala index adeda0981fe8..eb39aa41cd6c 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala @@ -291,11 +291,11 @@ case class ArrayTransform( */ // scalastyle:off line.size.limit @ExpressionDescription( - usage = """_FUNC_(expr, func) - Sorts the input array in ascending order. The elements of the - input array must be orderable. Null elements will be placed at the end of the returned - array. Since 3.0.0 this function also sorts and returns the array based on the given - comparator function. The comparator will take two arguments - representing two elements of the array. + usage = """_FUNC_(expr, func) - Sorts the input array. If func is omitted, sort + in ascending order. The elements of the input array must be orderable. Null elements + will be placed at the end of the returned. Since 3.0.0 this function also sorts and + and returns the array based on the given comparator function. The comparator will + take two arguments representing two elements of the array. It returns -1, 0, or 1 as the first element is less than, equal to, or greater than the second element. If the comparator function returns other values (including null), the function will fail and raise an error. From 232d56051ff768149eaa7edf97e9508ee7a83650 Mon Sep 17 00:00:00 2001 From: Kazuaki Ishizaki Date: Fri, 31 Jan 2020 01:41:01 +0900 Subject: [PATCH 2/2] address review comment --- .../spark/sql/catalyst/expressions/higherOrderFunctions.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala index eb39aa41cd6c..f8142d6b993c 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala @@ -293,7 +293,7 @@ case class ArrayTransform( @ExpressionDescription( usage = """_FUNC_(expr, func) - Sorts the input array. If func is omitted, sort in ascending order. The elements of the input array must be orderable. Null elements - will be placed at the end of the returned. Since 3.0.0 this function also sorts and + will be placed at the end of the returned array. Since 3.0.0 this function also sorts and returns the array based on the given comparator function. The comparator will take two arguments representing two elements of the array. It returns -1, 0, or 1 as the first element is less than, equal to, or greater