minh5 commented on issue #5827: [WIP] Improve column/alias handling for case insensitive engines URL: https://github.com/apache/incubator-superset/pull/5827#issuecomment-420688019 No problem, @villebro , I don't mind testing since I would really love for this bug to be ironed out. Right now I just have a very hacky way of dealing with Redshift data since my org only uses Redshift. However, running the latest test I've ran into this ``` 2018-09-12 11:15:01,596:INFO:root:SELECT DATE_TRUNC('day', day) AT TIME ZONE 'UTC' AS __timestamp, SUM(itemsales) AS "sum(itemsales)" FROM test.sales_table WHERE day >= '2017-09-12 00:00:00' AND day <= '2018-09-12 00:00:00' GROUP BY DATE_TRUNC('day', day) AT TIME ZONE 'UTC' ORDER BY "sum(itemsales)" DESC LIMIT 10000 2018-09-12 11:15:01,622:INFO:root:Database.get_sqla_engine(). Masked URL: redshift+psycopg2://testuser:[email protected]:5439/testdb 2018-09-12 11:15:05,136:DEBUG:root:[stats_logger] (incr) loaded_from_source 2018-09-12 11:15:05,506:INFO:werkzeug:127.0.0.1 - - [12/Sep/2018 11:15:05] "POST /superset/explore_json/ HTTP/1.1" 500 - Traceback (most recent call last): File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise raise value File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise raise value File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/minhmai/incubator-superset/superset/models/core.py", line 1010, in wrapper value = f(*args, **kwargs) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/flask_appbuilder/security/decorators.py", line 52, in wraps return f(self, *args, **kwargs) File "/Users/minhmai/incubator-superset/superset/views/core.py", line 1180, in explore_json force=force) File "/Users/minhmai/incubator-superset/superset/views/core.py", line 1114, in generate_json return json_success(viz_obj.json_dumps(payload), status=status) File "/Users/minhmai/incubator-superset/superset/viz.py", line 444, in json_dumps sort_keys=sort_keys, File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/simplejson/__init__.py", line 399, in dumps **kw).encode(obj) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/simplejson/encoder.py", line 296, in encode chunks = self.iterencode(o, _one_shot=True) File "/Users/minhmai/.pyenv/versions/3.4.3/envs/superset/lib/python3.4/site-packages/simplejson/encoder.py", line 378, in iterencode return _iterencode(o, 0) File "/Users/minhmai/incubator-superset/superset/utils.py", line 380, in json_int_dttm_ser obj = datetime_to_epoch(obj) File "/Users/minhmai/incubator-superset/superset/utils.py", line 366, in datetime_to_epoch return (dttm - epoch_with_tz).total_seconds() * 1000 File "pandas/_libs/tslibs/timestamps.pyx", line 311, in pandas._libs.tslibs.timestamps._Timestamp.__sub__ TypeError: Timestamp subtraction must have the same timezones or no timezones ```
---------------------------------------------------------------- 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]
