You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/11/13 17:55:49 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #26507: [WIP][SQL][2.4] Parse timestamps in microsecond precision in JSON datasource

MaxGekk 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_r345909998
 
 

 ##########
 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:
   > Do we have a simple rule?
   
   I haven't found simpler approach for now. The difference between interval and timestamp is the former one may have time zone at the end or anything else. We cannot say to users don't use the pattern like `mm:ss.SSSSSSXXX yyyy/MM/dd`

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