You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "the-sakthi (via GitHub)" <gi...@apache.org> on 2025/04/01 07:18:27 UTC

Re: [PR] [SPARK-51423][SQL] Add the current_time() function for TIME datatype [spark]

the-sakthi commented on code in PR #50336:
URL: https://github.com/apache/spark/pull/50336#discussion_r2022286788


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/SparkDateTimeUtils.scala:
##########
@@ -133,6 +134,32 @@ trait SparkDateTimeUtils {
     }
   }
 
+  /**
+   * Gets the number of microseconds since midnight using the session time zone.
+   */
+  def instantToMicrosOfDay(instant: Instant): Long = {
+    val zoneId = getZoneId(SqlApiConf.get.sessionLocalTimeZone)

Review Comment:
   Ah sure. Makes sense.



-- 
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: reviews-unsubscribe@spark.apache.org

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


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