[jira] [Assigned] (SPARK-14639) Add `bround` function in Python/R.

2016-04-19 Thread Apache Spark (JIRA)

 [ 
https://issues.apache.org/jira/browse/SPARK-14639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-14639:


Assignee: (was: Apache Spark)

> Add `bround` function in Python/R.
> --
>
> Key: SPARK-14639
> URL: https://issues.apache.org/jira/browse/SPARK-14639
> Project: Spark
>  Issue Type: Improvement
>Reporter: Dongjoon Hyun
>
> This issue aims to expose Scala `bround` function in Python/R API.
> `bround` function is implemented in SPARK-14614 by extending current `round` 
> function.
> We used the following semantics from 
> [Hive|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/RoundUtils.java].
> {code}
> public static double bround(double input, int scale) {
> if (Double.isNaN(input) || Double.isInfinite(input)) {
>   return input;
> }
> return BigDecimal.valueOf(input).setScale(scale, 
> RoundingMode.HALF_EVEN).doubleValue();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Assigned] (SPARK-14639) Add `bround` function in Python/R.

2016-04-19 Thread Apache Spark (JIRA)

 [ 
https://issues.apache.org/jira/browse/SPARK-14639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-14639:


Assignee: Apache Spark

> Add `bround` function in Python/R.
> --
>
> Key: SPARK-14639
> URL: https://issues.apache.org/jira/browse/SPARK-14639
> Project: Spark
>  Issue Type: Improvement
>Reporter: Dongjoon Hyun
>Assignee: Apache Spark
>
> This issue aims to expose Scala `bround` function in Python/R API.
> `bround` function is implemented in SPARK-14614 by extending current `round` 
> function.
> We used the following semantics from 
> [Hive|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/RoundUtils.java].
> {code}
> public static double bround(double input, int scale) {
> if (Double.isNaN(input) || Double.isInfinite(input)) {
>   return input;
> }
> return BigDecimal.valueOf(input).setScale(scale, 
> RoundingMode.HALF_EVEN).doubleValue();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org