MaxGekk opened a new pull request #23596: [SPARK-26652] Use Proleptic Gregorian 
Calendar in Literal.fromString
URL: https://github.com/apache/spark/pull/23596
 
 
   ## What changes were proposed in this pull request?
   
   - Avoid using `Timestamp.valueOf` and `Date.valueOf` in parsing 
`TimestampType` and `DateType` literal values in `Literal.fromString` since the 
method uses the hybrid calendar (Julian+Gregorian) internally.
   - Replace the methods above by `stringToDate` and `stringToTimestamp` 
because they have been already ported on Proleptic Gregorian calendar which is 
required by SQL standard.
   - Reuse `Literal.fromString` from `AstBuilder` in parsing `Timestamp` and 
`Date` literal values.
   
   ## How was this patch tested?
   
   The changes were tested by `ExpressionParserSuite` and 
`LiteralExpressionSuite`.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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