sathiyapk commented on a change in pull request #34593:
URL: https://github.com/apache/spark/pull/34593#discussion_r754671246



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala
##########
@@ -1500,26 +1514,37 @@ abstract class RoundBase(child: Expression, scale: 
Expression,
 }
 
 /**
- * Round an expression to d decimal places using HALF_UP rounding mode.
- * round(2.5) == 3.0, round(3.5) == 4.0.
+ * Round an expression to d decimal places using given rounding mode, default 
rounding mode HALF_UP.
+ * round(2.5) == 3.0, round(3.5) == 4.0,
+ * round(3.6, 0, 'half_down') == 4.0, round(3.6, 0, 'down') == 3.0.
  */
 // scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = "_FUNC_(expr, d) - Returns `expr` rounded to `d` decimal places 
using HALF_UP rounding mode.",
+  usage = "_FUNC_(expr, d) - Returns `expr` rounded to `d` decimal places 
using given rounding mode.",
   examples = """
     Examples:
       > SELECT _FUNC_(2.5, 0);
        3
+      > SELECT _FUNC_(2.6, 0, 'down');

Review comment:
       yes sure.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to