neillturner opened a new issue #16399:
URL: https://github.com/apache/superset/issues/16399


   when  you go into sql editor and select a redshift schema and then a table 
superset attempts to show the table fields in the bottom right half of the 
screen. instead gets this error.
   
   
   ### Expected results
   
   a list of fields from the table i suppose. 
   
   ### Actual results
   log shows: 
   Query 79: Running statement 1 out of 1
   2021-08-23 14:16:50,956:INFO:superset.sql_lab:Query 79: Running statement 1 
out of 1
   [SupersetError(message='Casting from timestamp[us] to timestamp[ns] would 
result in out of bounds timestamp: -61979731200000000', 
error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 
'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, 
extra={'engine_name': 'Amazon Redshift', 'issue_codes': [{'code': 1002, 
'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   Traceback (most recent call last):
     File "/app/superset/views/base.py", line 204, in wraps
       return f(self, *args, **kwargs)
     File "/app/superset/utils/log.py", line 242, in wrapper
       value = f(*args, **kwargs)
     File "/app/superset/views/core.py", line 2578, in sql_json
       return self.sql_json_exec(request.json, log_params)
     File "/app/superset/views/core.py", line 2767, in sql_json_exec
       session, rendered_query, query, expand_data, log_params
     File "/app/superset/views/core.py", line 2563, in _sql_json_sync
       [SupersetError(**params) for params in data["errors"]]
   superset.exceptions.SupersetErrorsException: [SupersetError(message='Casting 
from timestamp[us] to timestamp[ns] would result in out of bounds timestamp: 
-61979731200000000', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 
'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, 
extra={'engine_name': 'Amazon Redshift', 'issue_codes': [{'code': 1002, 
'message': 'Issue 1002 - The database returned an unexpected error.'}]})
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   
    go into sql editor and select a redshift schema and then a table superset
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `latest` docker image 
   - python version: Python 3.7.9
   - node.js version: none
   - any feature flags active:
   pip install psycopg2==2.9.1 redis==3.2.1 Authlib PyAthenaJDBC>1.0.9 
PyAthena>1.2.0 sqlalchemy-redshift==0.8.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. YES
   - [ ] I have reproduced the issue with at least the latest released version 
of superset. YES
   - [ ] I have checked the issue tracker for the same issue and I haven't 
found one similar. THERE SEEM TO BE SIMILAR TIMESTAMP ISSUES WITH OTHER 
DATABASE TYPES/DRIVERS. 
   
   ### Additional context
   
   Add any other context about the problem here.
   
   It could be related to having redshift fields of type TIMESTAMP WITHOUT TIME 
ZONE
   


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