findepi commented on issue #17534:
URL: https://github.com/apache/datafusion/issues/17534#issuecomment-3386688774

   Note that this issue is filed for a cast from 9999-12-31 date to a timestamp.
   This cast cannot succeed.  Timestamp type defaults to nanosecond precision 
while is backed by 64-bit number. The max timestamp is in year 2262.
   
   As the cast cannot succeed, the query should fail. Definitely not panic. 
This is what I expect the fix to be.
   
   BTW dates 0001-01-01 and 9999-12-31 are actually used in real-world queries, 
and so are timestamps on those dates (sometimes explicitly in a query, 
sometimes a result of a cast).  It's a pity that DataFusion's default timestamp 
doesn't handle these real-world queries' data points, but it's not what this 
issue is about. They can, and they are, still supported when using timestamps 
with lower precision.
   
   
   BTW2 `chrono` can handle all these date/times without issue. It uses 19 bits 
for the year and sufficient bits for month, day, hour, etc., giving it a range 
from 262144 BCE to 262142 CE. I think `chrono` is already used and it's not a 
limiting factor here.


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

To unsubscribe, e-mail: [email protected]

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