ulysses-you commented on code in PR #38760:
URL: https://github.com/apache/spark/pull/38760#discussion_r1029962313
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/types/DecimalSuite.scala:
##########
@@ -384,4 +384,11 @@ class DecimalSuite extends SparkFunSuite with
PrivateMethodTester with SQLHelper
}
}
}
+
+ test("SPARK-41219: Decimal changePrecision should work with decimal(0, 0)") {
+ assert(Decimal(0).changePrecision(0, 0))
+ assert(Decimal(0L).changePrecision(0, 0))
+ assert(Decimal(java.math.BigInteger.valueOf(0)).changePrecision(0, 0))
+ assert(Decimal(BigDecimal(0)).changePrecision(0, 0))
Review Comment:
this is the key test, before it returned false
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]