Skip to content

Commit cb37fe3

Browse files
committed
Replace 2933263 by LocalDate.of(10001, 1, 1).toEpochDay
1 parent 6a64946 commit cb37fe3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
494494
// Valid range of DateType is [0001-01-01, 9999-12-31]
495495
val maxMonthInterval = 10000 * 12
496496
checkEvaluation(
497-
AddMonths(Literal(LocalDate.parse("0001-01-01")), Literal(maxMonthInterval)), 2933263)
497+
AddMonths(Literal(LocalDate.parse("0001-01-01")), Literal(maxMonthInterval)),
498+
LocalDate.of(10001, 1, 1).toEpochDay.toInt)
498499
checkEvaluation(
499500
AddMonths(Literal(Date.valueOf("9999-12-31")), Literal(-1 * maxMonthInterval)), -719529)
500501
// Test evaluation results between Interpreted mode and Codegen mode

0 commit comments

Comments
 (0)