MaxGekk opened a new pull request #24141: [SPARK-27199][SQL] Replace TimeZone 
by ZoneId in TimestampFormatter API
URL: https://github.com/apache/spark/pull/24141
 
 
   ## What changes were proposed in this pull request?
   
   In the PR, I propose to use `ZoneId` instead of `TimeZone` in:
   - the `apply` and `getFractionFormatter ` methods of the 
`TimestampFormatter` object,
   - and in implementations of the `TimestampFormatter` trait like 
`FractionTimestampFormatter`.
   
   The reason of the changes is to avoid unnecessary conversion from `TimeZone` 
to `ZoneId` because `ZoneId` is used in `TimestampFormatter` implementations 
internally, and the conversion is performed via `String` which is not for free. 
Also taking into account that `TimeZone` instances are converted from `String` 
in some cases, the worse case looks like `String` -> `TimeZone` -> `String` -> 
`ZoneId`. The PR eliminates the unneeded conversions.
   
   ## How was this patch tested?
   
   It was tested by `DateExpressionsSuite`, `DateTimeUtilsSuite` and 
`TimestampFormatterSuite`.

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