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/04/11 06:10:51 UTC

[GitHub] [spark] MaxGekk opened a new pull request #24342: [SPARK-27438][SQL] Parse strings with timestamps by to_timestamp() in microsecond precision

MaxGekk opened a new pull request #24342: [SPARK-27438][SQL] Parse strings with timestamps by to_timestamp() in microsecond precision
URL: https://github.com/apache/spark/pull/24342
 
 
   ## What changes were proposed in this pull request?
   
   Add a `downScaleFactor` value to `UnixTime` to control scaling of returned values. Default value of `downScaleFactor` is `1000000` (microseconds per second) which means the result of string parsing in microseconds is divided by `1000000` in `UnixTimestamp` and `ToUnixTimestamp`. The `UnixTime` class is used in `ParseToTimestamp` which sets `downScaleFactor` to 1 as proposed in the PR. In this way, the `ParseToTimestamp` expression and `to_timestamp` function will be able to parse input strings with timestamps in microsecond precision.
   
   ## How was this patch tested?
   
   By `DateFunctionsSuite`, and added new test to the test suite.

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