We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d67a5ea commit 8a447b1Copy full SHA for 8a447b1
sql/catalyst/src/test/scala/org/apache/spark/sql/types/decimal/DecimalSuite.scala
@@ -156,4 +156,10 @@ class DecimalSuite extends SparkFunSuite with PrivateMethodTester {
156
assert(Decimal(-100) % Decimal(3) === Decimal(-1))
157
assert(Decimal(100) % Decimal(0) === null)
158
}
159
+
160
+ test("set/setOrNull") {
161
+ assert(new Decimal().set(10L, 10, 0).toUnscaledLong === 10L)
162
+ assert(new Decimal().set(100L, 10, 0).toUnscaledLong === 100L)
163
+ assert(Decimal(Long.MaxValue, 100, 0).toUnscaledLong === Long.MaxValue)
164
+ }
165
0 commit comments