You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/12 14:53:56 UTC

[GitHub] romankierzkowski opened a new issue #4407: Error on SQL execution: "Could not broadcast input array from shape (26896) into shape (1,164)"

romankierzkowski opened a new issue #4407: Error on SQL execution: "Could not broadcast input array from shape (26896) into shape (1,164)"
URL: https://github.com/apache/incubator-superset/issues/4407
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x ] I have checked the superset logs for python stacktraces and included it here as text if 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
   
   
   ### Superset version
   superset (0.22.1)
   
   ### Expected results
   The query should return the left joined two tables grouped by id of the first table and max value of created column of the second table.
   
   ### Actual results
   The "Could not broadcast input array from shape (26896) into shape (1,164)" is displayed. Full stack from logs:
   
   2018-02-12 12:29:31,553:ERROR:root:could not broadcast input array from shape (26896) into shape (1,164)
   Traceback (most recent call last):
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/superset/views/core.py", line 2188, in sql_json
       query_id=query_id, return_results=True)
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/celery/local.py", line 191, in __call__
       return self._get_current_object()(*a, **kw)
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/celery/app/task.py", line 380, in __call__
       return self.run(*args, **kwargs)
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/superset/sql_lab.py", line 94, in get_sql_results
       ctask, query_id, return_results, store_results, user_name)
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/superset/sql_lab.py", line 245, in execute_sql
       'data': cdf.data if cdf.data else [],
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/superset/dataframe.py", line 55, in data
       for row in self.__df.values]
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/pandas/core/generic.py", line 3272, in values
       return self.as_matrix()
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/pandas/core/generic.py", line 3253, in as_matrix
       return self._data.as_matrix(columns).T
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/pandas/core/internals.py", line 3450, in as_matrix
       return mgr._interleave()
     File "/home/superset/superset-vevn/lib/python3.5/site-packages/pandas/core/internals.py", line 3477, in _interleave
       result[rl.indexer] = blk.get_values(dtype)
   ValueError: could not broadcast input array from shape (26896) into shape (1,164)
   
   ### Steps to reproduce
   
   Run query:
   
   SELECT
           a.id,
   	max(b.created)
   FROM 
   	a
   	LEFT JOIN 
   	b ON b.owner_id = a.id
   GROUP BY a.id
   
   Without a.id in the result, the query executes giving the odd results. It returns much more results than it should. Execution in psql works fine as well.
   
   SELECT
   	MAX(b.created)
   FROM 
   	b
   GROUP BY b.owner_id
   
   My environment:
   
   alembic==0.9.7
   amqp==2.2.2
   asn1crypto==0.24.0
   Babel==2.5.3
   billiard==3.5.0.3
   boto3==1.5.26
   botocore==1.8.40
   celery==4.1.0
   certifi==2018.1.18
   cffi==1.11.4
   chardet==3.0.4
   click==6.7
   colorama==0.3.9
   cryptography==1.9
   defusedxml==0.5.0
   docutils==0.14
   Flask==0.12.2
   Flask-AppBuilder==1.9.4
   Flask-Babel==0.11.1
   Flask-Cache==0.13.1
   Flask-Login==0.2.11
   Flask-Migrate==2.0.3
   Flask-OpenID==1.2.5
   Flask-Script==2.0.5
   Flask-SQLAlchemy==2.1
   Flask-Testing==0.6.2
   Flask-WTF==0.14.2
   flower==0.9.1
   future==0.16.0
   gevent==1.2.2
   greenlet==0.4.13
   gunicorn==19.7.1
   humanize==0.5.1
   idna==2.5
   itsdangerous==0.24
   Jinja2==2.10
   jmespath==0.9.3
   kombu==4.1.0
   Mako==1.0.7
   Markdown==2.6.8
   MarkupSafe==1.0
   numpy==1.14.0
   pandas==0.20.3
   parsedatetime==2.0
   pathlib2==2.3.0
   pkg-resources==0.0.0
   psycopg2==2.7.4
   pycparser==2.18
   pydruid==0.3.1
   PyHive==0.5.0
   python-dateutil==2.6.0
   python-editor==1.0.3
   python3-openid==3.1.0
   pytz==2018.3
   PyYAML==3.12
   requests==2.17.3
   s3transfer==0.1.12
   sasl==0.2.1
   simplejson==3.10.0
   six==1.10.0
   SQLAlchemy==1.1.9
   SQLAlchemy-Utils==0.32.16
   sqlparse==0.2.3
   superset==0.22.1
   thrift==0.11.0
   thrift-sasl==0.3.0
   tornado==4.2
   Unidecode==1.0.22
   urllib3==1.21.1
   vine==1.1.4
   Werkzeug==0.14.1
   WTForms==2.1
   
   
   
   
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services