d80tb7 opened a new pull request #31511:
URL: https://github.com/apache/spark/pull/31511


   WIP
   
   Things I don't like:
   
   1. We're still calling `convertSpecialDate/Timestamp` just as much as the 
previous solution as it's called twice in the `parse()` methods.
   2. `DateFormatter.getPartitioningFormatter` and 
`TimestampFormatter.getPartitioningFormatter` are duplicating the legacy format 
stuff in `DateFormatter.apply` and `TimestampFormatter.apply``` respectively.
   
   1) Could be solved by extracting the parse logic from e.g. 
Iso8601DateFormatter into some mthod with a `considerSpecial` flag.  This would 
come at the cost of the code more difficult to read. E.g. we might need an 
extra abstract base class.
   
   2) Can only be solved if we decide we don't need to support legacy formats, 
but this would be a breaking change with the previous code.
   


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



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

Reply via email to