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

Non Aggregate Query Vausing Index out of Range #488

Closed
JohnOmernik opened this issue May 18, 2016 · 1 comment
Closed

Non Aggregate Query Vausing Index out of Range #488

JohnOmernik opened this issue May 18, 2016 · 1 comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead validation:required A committer should validate the issue

Comments

@JohnOmernik
Copy link

I am trying to do a query/slice that doesn't use aggregates.
Some thoughts:

  1. When I use aggregates, everything is working fine.
  2. If remove the groupby and metrics fields leave them blank) and specify columns in not-grouped by, then I get the index out of range (traceback below)
  3. Since the out of range appeared to be the metrics, I added the metrics and used non-group by I get the error that we can only use group by and metrics or not grouped by, not both. (makes sense)

So, it appears that when I am trying to do a not-grouped by query, that it tries to reference my metrics of which I don't have any specified. (there are metrics on the table itself... just not in the query I am running)

Traceback:

raceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
return f(self, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/caravel/models.py", line 1294, in wrapper
return f(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/caravel/views.py", line 557, in explore
payload = obj.get_json()
File "/usr/local/lib/python2.7/dist-packages/caravel/viz.py", line 258, in get_json
'data': self.get_data(),
File "/usr/local/lib/python2.7/dist-packages/caravel/viz.py", line 368, in get_data
df = self.get_df()
File "/usr/local/lib/python2.7/dist-packages/caravel/viz.py", line 360, in get_df
df = super(TableViz, self).get_df(query_obj)
File "/usr/local/lib/python2.7/dist-packages/caravel/viz.py", line 144, in get_df
self.results = self.datasource.query(**query_obj)
File "/usr/local/lib/python2.7/dist-packages/caravel/models.py", line 611, in query
if m.metric_name == metrics[0]][0]
IndexError: list index out of range

@xrmx xrmx added the !deprecated-label:bug Deprecated label - Use #bug instead label Aug 9, 2016
@xrmx
Copy link
Contributor

xrmx commented Aug 9, 2016

Is this still an issue with latest caravel?

@xrmx xrmx added the validation:required A committer should validate the issue label Aug 9, 2016
@xrmx xrmx closed this as completed Sep 17, 2016
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
* fix(legacy-plugin-chart-nvd3): disable linting rule that conflicts with having actual working code

* cleanup unnecessary eslint-disable
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
* fix(legacy-plugin-chart-nvd3): disable linting rule that conflicts with having actual working code

* cleanup unnecessary eslint-disable
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
* fix(legacy-plugin-chart-nvd3): disable linting rule that conflicts with having actual working code

* cleanup unnecessary eslint-disable
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
* fix(legacy-plugin-chart-nvd3): disable linting rule that conflicts with having actual working code

* cleanup unnecessary eslint-disable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead validation:required A committer should validate the issue
Projects
None yet
Development

No branches or pull requests

2 participants