Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superset with Postgresql gets timezone error #17997

Closed
leftluoyi opened this issue Jan 11, 2022 · 1 comment · Fixed by #17999
Closed

Superset with Postgresql gets timezone error #17997

leftluoyi opened this issue Jan 11, 2022 · 1 comment · Fixed by #17999
Labels
#bug Bug report

Comments

@leftluoyi
Copy link

Versions
Apache Superset: 0.5.3, actually is docker image with tag latest
Postgresql 11.6

Expected results
run select now() get the current time

Actual results
Have two instances of Apache Superset, one is installed locally using docker image just as dockerhub. The other one is installed on Kubernetes cluster using helm just as this tutorial. The actual results is:

  1. On the local docker instance, the select now() command ran successfully
    image

  2. But the Kubernetes instance got the following error
    image

This is the Trackback of the error in the pod

Traceback (most recent call last):
  File "/app/superset/views/base.py", line 205, 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 2484, in sql_json
    command_result: CommandResult = command.run()
  File "/app/superset/sqllab/command.py", line 104, in run
    raise ex
  File "/app/superset/sqllab/command.py", line 96, in run
    status = self._run_sql_json_exec_from_scratch()
  File "/app/superset/sqllab/command.py", line 138, in _run_sql_json_exec_from_scratch
    raise ex
  File "/app/superset/sqllab/command.py", line 133, in _run_sql_json_exec_from_scratch
    return self._sql_json_executor.execute(
  File "/app/superset/sqllab/sql_json_executer.py", line 111, in execute
    raise SupersetErrorsException(
superset.exceptions.SupersetErrorsException: [SupersetError(message="'+00'", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
10.244.1.123 - - [11/Jan/2022:07:52:34 +0000] "POST /superset/sql_json/ HTTP/1.1" 500 236 "https://superset.deepsensing.team:88/superset/sqllab/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.57"

Actually, querying any column with TIMESTAMP WITH TIME ZONE type leads to the same error.

Steps to reproduce
Run select now(); in the SQL Lab -> SQL Editor.

@villebro
Copy link
Member

Thanks for reporting - please check the proposed fix here: #17999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@leftluoyi @villebro and others