cloud-fan commented on code in PR #44261:
URL: https://github.com/apache/spark/pull/44261#discussion_r1438257053


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala:
##########
@@ -960,9 +946,9 @@ class DateExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
               MICROSECONDS.toSeconds(DateTimeUtils.daysToMicros(
                 DateTimeUtils.fromJavaDate(Date.valueOf("2015-07-24")), 
tz.toZoneId)))
             val t1 = UnixTimestamp(
-              CurrentTimestamp(), Literal("yyyy-MM-dd 
HH:mm:ss")).eval().asInstanceOf[Long]
+              CurrentTimestamp, Literal("yyyy-MM-dd 
HH:mm:ss")).eval().asInstanceOf[Long]
             val t2 = UnixTimestamp(
-              CurrentTimestamp(), Literal("yyyy-MM-dd 
HH:mm:ss")).eval().asInstanceOf[Long]
+              CurrentTimestamp, Literal("yyyy-MM-dd 
HH:mm:ss")).eval().asInstanceOf[Long]
             assert(t2 - t1 <= 1)

Review Comment:
   This doesn't test anything now as we are testing the same CurrentTimestamp 
instance. Shall we move this to `ComputeCurrentTimeSuite`?



##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala:
##########
@@ -1031,9 +1017,9 @@ class DateExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
               MICROSECONDS.toSeconds(DateTimeUtils.daysToMicros(
                 DateTimeUtils.fromJavaDate(Date.valueOf("2015-07-24")), zid)))
             val t1 = ToUnixTimestamp(
-              CurrentTimestamp(), Literal(fmt1)).eval().asInstanceOf[Long]
+              CurrentTimestamp, Literal(fmt1)).eval().asInstanceOf[Long]
             val t2 = ToUnixTimestamp(
-              CurrentTimestamp(), Literal(fmt1)).eval().asInstanceOf[Long]
+              CurrentTimestamp, Literal(fmt1)).eval().asInstanceOf[Long]
             assert(t2 - t1 <= 1)

Review Comment:
   ditto



-- 
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]

Reply via email to