You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2017/03/24 23:10:34 UTC
spark git commit: [DOCS] Clarify round mode for format_number & round
functions
Repository: spark
Updated Branches:
refs/heads/master e011004be -> f88f56b83
[DOCS] Clarify round mode for format_number & round functions
## What changes were proposed in this pull request?
Updated the description for the `format_number` description to indicate that it uses `HALF_EVEN` rounding. Updated the description for the `round` description to indicate that it uses `HALF_UP` rounding.
## How was this patch tested?
Just changing the two function comments so no testing involved.
Please review http://spark.apache.org/contributing.html before opening a pull request.
Author: Roxanne Moslehi <rm...@palantir.com>
Author: roxannemoslehi <rm...@berkeley.edu>
Closes #17399 from roxannemoslehi/patch-1.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f88f56b8
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f88f56b8
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f88f56b8
Branch: refs/heads/master
Commit: f88f56b835b3a61ff2d59236e7fa05eda5aefcaa
Parents: e011004
Author: Roxanne Moslehi <rm...@palantir.com>
Authored: Sat Mar 25 00:10:30 2017 +0100
Committer: Reynold Xin <rx...@databricks.com>
Committed: Sat Mar 25 00:10:30 2017 +0100
----------------------------------------------------------------------
.../src/main/scala/org/apache/spark/sql/functions.scala | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/f88f56b8/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
index 66bb881..acdb8e2 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala
@@ -1861,7 +1861,7 @@ 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
@@ -1869,8 +1869,8 @@ object functions {
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
@@ -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.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org