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 2021/11/17 21:07:20 UTC

[GitHub] [superset] ganczarek opened a new issue #17469: Presto engine: zip argument #1 must support iteration

ganczarek opened a new issue #17469:
URL: https://github.com/apache/superset/issues/17469


   When `PRESTO_EXPAND_DATA` is enabled Superset may try to zip with None object when expanding nested data that contains a NULL.
   
   If you run this Presto query:
   ```
   SELECT CAST(NULL              AS ROW(x ROW(y VARCHAR)))
   UNION
   SELECT CAST(ROW(NULL)         AS ROW(x ROW(y VARCHAR)))
   ```
   then it fails. However, if you run each subquery separately then it won't.
   
   #### How to reproduce the bug
   
   1. Set `PRESTO_EXPAND_DATA` flag to `True` in your Superset configuration
   1. Go to SQL Editor
   1. Select Presto database
   1. Run the following query:
   ```
   SELECT CAST(NULL              AS ROW(x ROW(y VARCHAR)))
   UNION
   SELECT CAST(ROW(NULL)         AS ROW(x ROW(y VARCHAR)))
   UNION 
   SELECT CAST(ROW(ROW(NULL))    AS ROW(x ROW(y VARCHAR)))
   UNION 
   SELECT CAST(ROW(ROW('test'))  AS ROW(x ROW(y VARCHAR)))
   ```
   
   ### Expected results
   
   Data with nulls should be expanded and displayed by Superset
   
   ### Actual results
   
   An error is displayed:
   ```
   DB engine Error
   zip argument #1 must support iteration
   
   This may be triggered by:
   Issue 1011 - Superset encountered an unexpected error. 
   ```
   
   ### Environment
   
   - superset version: `1.3.1` and `1.3.2`
   - python version: `3.7.12`
   - any feature flags active: `PRESTO_EXPAND_DATA=True`
   
   ### 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.
   
   ### Additional context
   
   Stack trace:
   ```
   ERROR:superset.views.base:zip argument #1 must support iteration
   Traceback (most recent call last):
     File "/opt/superset/flask/app.py", line 1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/opt/superset/flask/app.py", line 1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/opt/superset/flask_appbuilder/security/decorators.py", line 151, in wraps
       return f(self, *args, **kwargs)
     File "/opt/superset/superset/utils/log.py", line 241, in wrapper
       value = f(*args, **kwargs)
     File "/opt/superset/superset/views/core.py", line 2209, in results
       return self.results_exec(key)
     File "/opt/superset/superset/views/core.py", line 2280, in results_exec
       payload, query, cast(bool, results_backend_use_msgpack)
     File "/opt/superset/superset/views/utils.py", line 614, in _deserialize_results_payload
       ds_payload["selected_columns"], ds_payload["data"]
     File "/opt/superset/superset/db_engine_specs/presto.py", line 876, in expand_data
       for value, col in zip(values, expanded):
   TypeError: zip argument #1 must support iteration
   ```
   


-- 
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] villebro commented on issue #17469: Presto engine: zip argument #1 must support iteration

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


   Fixed via #17470, closing


-- 
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] villebro closed issue #17469: Presto engine: zip argument #1 must support iteration

Posted by GitBox <gi...@apache.org>.
villebro closed issue #17469:
URL: https://github.com/apache/superset/issues/17469


   


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