dongjoon-hyun commented on a change in pull request #23945: [SPARK-27035][SQL] 
Get more precise current time
URL: https://github.com/apache/spark/pull/23945#discussion_r261887827
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
 ##########
 @@ -96,7 +96,7 @@ case class CurrentTimestamp() extends LeafExpression with 
CodegenFallback {
   override def dataType: DataType = TimestampType
 
   override def eval(input: InternalRow): Any = {
-    System.currentTimeMillis() * 1000L
+    instantToMicros(Instant.now())
 
 Review comment:
   BTW, JDK-8068730 is for JDK9, and it's unclear to me if this is applicable 
in JDK8 environment. Could you add more clear explanation about JDK8 in the PR 
description please? Some sentence or pointer would be enough.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to