beliefer commented on code in PR #44261:
URL: https://github.com/apache/spark/pull/44261#discussion_r1438580819
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala:
##########
@@ -78,31 +81,14 @@ class DateExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
}
}
- test("datetime function current_date") {
- val d0 = DateTimeUtils.currentDate(UTC)
- val cd = CurrentDate(UTC_OPT).eval(EmptyRow).asInstanceOf[Int]
- val d1 = DateTimeUtils.currentDate(UTC)
- assert(d0 <= cd && cd <= d1 && d1 - d0 <= 1)
-
- val cdjst = CurrentDate(JST_OPT).eval(EmptyRow).asInstanceOf[Int]
- val cdpst = CurrentDate(PST_OPT).eval(EmptyRow).asInstanceOf[Int]
- assert(cdpst <= cd && cd <= cdjst)
Review Comment:
Could we keep these test cases by use `ComputeCurrentTime`?
--
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]