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


With regards,
Apache Git Services

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

Reply via email to