Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1861,16 +1861,16 @@ object functions {
def rint(columnName: String): Column = rint(Column(columnName))

/**
* Returns the value of the column `e` rounded to 0 decimal places.
* Returns the value of the column `e` rounded to 0 decimal places with HALF_UP round mode.
*
* @group math_funcs
* @since 1.5.0
*/
def round(e: Column): Column = round(e, 0)

/**
* Round the value of `e` to `scale` decimal places if `scale` is greater than or equal to 0
* or at integral part when `scale` is less than 0.
* Round the value of `e` to `scale` decimal places with HALF_UP round mode
* if `scale` is greater than or equal to 0 or at integral part when `scale` is less than 0.
*
* @group math_funcs
* @since 1.5.0
Expand Down Expand Up @@ -2191,8 +2191,8 @@ object functions {
}

/**
* Formats numeric column x to a format like '#,###,###.##', rounded to d decimal places,
* and returns the result as a string column.
* Formats numeric column x to a format like '#,###,###.##', rounded to d decimal places
* with HALF_EVEN round mode, and returns the result as a string column.
*
* If d is 0, the result has no decimal point or fractional part.
* If d is less than 0, the result will be null.
Expand Down