You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/09 14:39:21 UTC

[GitHub] [superset] dmelo opened a new issue, #19995: Lack of support for column type tstzrange in PostgreSQL

dmelo opened a new issue, #19995:
URL: https://github.com/apache/superset/issues/19995

   Superset returns an error when I try a query with a `tstzrange` column.
   
   #### How to reproduce the bug
   
   Considering Superset have a connection to a PostgreSQL database and there is a table with at least one column of the type `tstzrange`, Go to "SQL Lab" -> "SQL Editor" and try a select query that includes the `tstzrange` column, e.g.: `select * from user`
   
   ### Expected results
   
   I expect to see a table with the results from the query
   
   ### Actual results
   
   An error message: 
   
   ```
   PostgreSQL Error
   
   Unserializable object [2022-05-06 21:12:02.578651+00:00, None) of type <class 'psycopg2._range.DateTimeTZRange'>
   
   This may be triggered by:
   Issue 1002 - The database returned an unexpected error. 
   ```
   
   Logs:
   
   ```
   
   
   
   2022-05-09 14:33:34,658:INFO:superset.sql_lab:Query 879: Executing 1 statement(s)
   --
   Query 879: Set query to 'running'
   2022-05-09 14:33:34,658:INFO:superset.sql_lab:Query 879: Set query to 'running'
   Query 879: Running statement 1 out of 1
   2022-05-09 14:33:35,068:INFO:superset.sql_lab:Query 879: Running statement 1 out of 1
   [SupersetError(message="Unserializable object [2022-05-06 21:12:02.578651+00:00, None) of type <class 'psycopg2._range.DateTimeTZRange'>", 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.'}]})]
   Traceback (most recent call last):
   File "/app/superset/views/base.py", line 211, in wraps
   return f(self, *args, **kwargs)
   File "/app/superset/utils/log.py", line 245, in wrapper
   value = f(*args, **kwargs)
   File "/app/superset/views/core.py", line 2574, 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="Unserializable object [2022-05-06 21:12:02.578651+00:00, None) of type <class 'psycopg2._range.DateTimeTZRange'>", 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.'}]})]
   2022-05-09 14:33:35,871:WARNING:superset.views.base:[SupersetError(message="Unserializable object [2022-05-06 21:12:02.578651+00:00, None) of type <class 'psycopg2._range.DateTimeTZRange'>", 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.'}]})]
   Traceback (most recent call last):
   File "/app/superset/views/base.py", line 211, in wraps
   return f(self, *args, **kwargs)
   File "/app/superset/utils/log.py", line 245, in wrapper
   value = f(*args, **kwargs)
   File "/app/superset/views/core.py", line 2574, 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="Unserializable object [2022-05-06 21:12:02.578651+00:00, None) of type <class 'psycopg2._range.DateTimeTZRange'>", 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.'}]})]
   ```
   
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Firefox 100
   
   Using [apache/superset:1.5.0](https://hub.docker.com/layers/superset/apache/superset/1.5.0/images/sha256-8f1865a6ff43b1471d271901fc9d5feac84b8cbfdeb3b35d35cbbdcde3b751b3?context=explore)
   
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Lack of support for column type tstzrange in PostgreSQL [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #19995:
URL: https://github.com/apache/superset/issues/19995#issuecomment-1932999863

   Thanks for the PR on this @dmelo - can you validate if this is still an issue in Superset 3.x? If so, hopefully we can touch up that PR and get it through. 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Lack of support for column type tstzrange in PostgreSQL [superset]

Posted by "dmelo (via GitHub)" <gi...@apache.org>.
dmelo commented on issue #19995:
URL: https://github.com/apache/superset/issues/19995#issuecomment-2049528675

   Using development mode on the master branch, with PosgreSQL 16, I can see that Superset is supporting tstzrange. I guess somebody else implemented this :smile: 
   
   ![2024-04-11_08-47](https://github.com/apache/superset/assets/89710/233af81b-027e-430a-9a0c-700113ed6c40)
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] dmelo commented on issue #19995: Lack of support for column type tstzrange in PostgreSQL

Posted by GitBox <gi...@apache.org>.
dmelo commented on issue #19995:
URL: https://github.com/apache/superset/issues/19995#issuecomment-1161753349

   Hi @dheardal . Yes. I have changed the code to interpret the column type that was causing the problem. I have opened a PR. Perhaps this is useful to you as well.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] dheardal commented on issue #19995: Lack of support for column type tstzrange in PostgreSQL

Posted by GitBox <gi...@apache.org>.
dheardal commented on issue #19995:
URL: https://github.com/apache/superset/issues/19995#issuecomment-1161541619

   @dmelo Did you get anywhere with this? I am encountering a similar issue with timestamptz columns


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Lack of support for column type tstzrange in PostgreSQL [superset]

Posted by "tophercf (via GitHub)" <gi...@apache.org>.
tophercf commented on issue #19995:
URL: https://github.com/apache/superset/issues/19995#issuecomment-2038196704

   would defs appreciate this fix!!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Lack of support for column type tstzrange in PostgreSQL [superset]

Posted by "dmelo (via GitHub)" <gi...@apache.org>.
dmelo closed issue #19995: Lack of support for column type tstzrange in PostgreSQL
URL: https://github.com/apache/superset/issues/19995


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org