spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] cloud-fan commented on a change in pull request #26507: [WIP][SQL][2.4] Parse timestamps in microsecond precision in JSON datasource
Date Wed, 13 Nov 2019 18:06:12 GMT
cloud-fan commented on a change in pull request #26507: [WIP][SQL][2.4] Parse timestamps in
microsecond precision in JSON datasource
URL: https://github.com/apache/spark/pull/26507#discussion_r345915057
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -1164,4 +1166,30 @@ object DateTimeUtils {
     threadLocalTimestampFormat.remove()
     threadLocalDateFormat.remove()
   }
+
+  class MicrosCalendar(tz: TimeZone) extends GregorianCalendar(tz, Locale.US) {
+    def getMicros(): SQLTimestamp = {
 
 Review comment:
   So what we get here is the milliseconds `FastDateFormat` extracts from the string. I believe
`FastDateFormat` can handle the part after seconds. e.g. `12:12:12.1234Z`, the milliseconds
part should be 1234.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message