linhongliu-db opened a new pull request #32959:
URL: https://github.com/apache/spark/pull/32959


   ### What changes were proposed in this pull request?
   DATE/TIMESTAMP literals support years 0000 to 9999. However, internally we 
support a range that is much larger.
   We can add or subtract large intervals from a date/timestamp and the system 
will happily process and display large negative and positive dates.
   
   Since we obviously cannot put this genie back into the bottle the only thing 
we can do is allow matching DATE/TIMESTAMP literals.
   
   
   ### Why are the changes needed?
   make spark more usable
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, after this PR, below SQL will have different results
   ```sql
   select cast('-10000-1-2' as date) as date_col
   ```
   before: NULL
   after: -10000-1-2
   
   
   ### How was this patch tested?
   newly added test cases
   


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