cloud-fan commented on a change in pull request #28534:
URL: https://github.com/apache/spark/pull/28534#discussion_r429067648



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala
##########
@@ -1146,4 +1146,25 @@ class DateExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
           Literal("yyyy-MM-dd'T'HH:mm:ss.SSSz")), "Fail to parse")
     }
   }
+
+  test("[SPARK-31710][SQL] Adds TIMESTAMP_SECONDS, " +
+    "TIMESTAMP_MILLIS and TIMESTAMP_MICROS functions") {
+    checkEvaluation(SecondsToTimestamp(Literal(1230219000)), 1230219000000000L)
+    checkEvaluation(SecondsToTimestamp(Literal(-1230219000)), 
-1230219000000000L)
+    checkEvaluation(SecondsToTimestamp(Literal.create(null, IntegerType)), 
null)
+    checkEvaluation(MillisToTimestamp(Literal(1230219000123L)), 
1230219000123000L)

Review comment:
       nit: `Literal(1230219000123L)), 1230219000123L * MICROS_PER_MLLIS`




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to