diff options
-rw-r--r-- | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateFunctionsSuite.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateFunctionsSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateFunctionsSuite.scala index f469f42116..a0991ec998 100644 --- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateFunctionsSuite.scala +++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateFunctionsSuite.scala @@ -74,7 +74,7 @@ class DateFunctionsSuite extends SparkFunSuite with ExpressionEvalHelper { (0 to 5).foreach { i => val c = Calendar.getInstance() c.set(y, m, 28, 0, 0, 0) - c.add(Calendar.DATE, 1) + c.add(Calendar.DATE, i) checkEvaluation(DayInYear(Cast(Literal(new Date(c.getTimeInMillis)), DateType)), sdfDay.format(c.getTime).toInt) } @@ -86,7 +86,7 @@ class DateFunctionsSuite extends SparkFunSuite with ExpressionEvalHelper { (0 to 5).foreach { i => val c = Calendar.getInstance() c.set(y, m, 28, 0, 0, 0) - c.add(Calendar.DATE, 1) + c.add(Calendar.DATE, i) checkEvaluation(DayInYear(Cast(Literal(new Date(c.getTimeInMillis)), DateType)), sdfDay.format(c.getTime).toInt) } |