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 6064ef2 commit 7a4cf9eCopy full SHA for 7a4cf9e
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
@@ -428,11 +428,14 @@ class DateTimeUtilsSuite extends SparkFunSuite {
428
}
429
430
test("SPARK-10439: bound checks") {
431
- // Avoid truncation when converting from ms to us.
+ // Avoid truncation when converting from ms to us. Make sure dates are within allowed range.
432
Seq(JLong.MIN_VALUE, JLong.MAX_VALUE).foreach { ts =>
433
intercept[IllegalArgumentException] {
434
fromJavaTimestamp(new Timestamp(ts))
435
436
+ intercept[IllegalArgumentException] {
437
+ fromJavaDate(new Date(ts))
438
+ }
439
440
441
// Make sure calculated nanos are positive, since that's what the Hive/Impala timestamp spec
0 commit comments