spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenghao-intel <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-11076][SQL]Add decimal support for floo...
Date Thu, 15 Oct 2015 00:24:44 GMT
Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9086#discussion_r42071415
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala ---
    @@ -309,10 +319,24 @@ final class Decimal extends Ordered[Decimal] with Serializable {
       }
     
       def abs: Decimal = if (this.compare(Decimal.ZERO) < 0) this.unary_- else this
    +
    +  def floor: Decimal = if (scale == 0) this else {
    +    val value = this.clone()
    +    value.changePrecision(precision, 0, ROUND_FLOOR)
    --- End diff --
    
    Oh, yes, forgot to change this line.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message