Description
Similar to 13661, 18596, 16487 timestamps older than 1677-09-22 00:12:43.145225
and newer than 2262-04-11 23:47:16.854775807
cannot be converted into pandas timestamp.
By the same logic, charts which create a DTTM_ALIAS
column in the backend query also cannot contain dates older than the range mentioned above, and trigger the same failure. They are coerced as NaNs, so that the data for dates within the range pandas supports can at least be shown without triggering the same error.
How to reproduce the bug
Sqllab
- Go to 'Sql Lab'
- Click on 'Sql Editor'
- Try
select TIMESTAMP '2263-02-02 00:00:00'
(this won't work) - Try
select TIMESTAMP '2262-02-02 00:00:00'
(this will work since it's inside the range pandas can support)
Charts
- Go to 'Charts'
- Select time series chart
- In the time column, add the date column which has dates outside the ranges mentioned above
- Fill in whatever metrics you want to visualise
Expected results
Returns the result correctly.
Actual results
Sqllab:
Casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp: 9248947200000000
Charts:
Out of bounds nanosecond timestamp: 9999-01-01 00:00:00
Environment
- browser type and version:
chrome
- superset version:
latest & 1.4.1
- python version:
3.8.12
- postgres version:
13.4
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven't found one similar.
There are some similar issues, but reviewer mentioned to open a new issue as the PR for the issue was already closed: #14006