Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15154#discussion_r79917425
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/types/DecimalSuite.scala ---
    @@ -191,4 +192,16 @@ class DecimalSuite extends SparkFunSuite with 
PrivateMethodTester {
         assert(new Decimal().set(100L, 10, 0).toUnscaledLong === 100L)
         assert(Decimal(Long.MaxValue, 100, 0).toUnscaledLong === Long.MaxValue)
       }
    +
    +  test("changePrecision() on compact decimal should respect rounding 
mode") {
    +    Seq(ROUND_FLOOR, ROUND_CEILING, ROUND_HALF_UP, 
ROUND_HALF_EVEN).foreach { mode =>
    +      Seq("1.0", "1.1", "1.6", "2.5", "5.5", "-1.0", "-1.1", "-1.6", 
"-2.5", "-5.5").foreach { n =>
    --- End diff --
    
    Currently, these numbers are copied from the java doc of RoundingMode, will 
add more for ROUND_HALF_EVEN


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to