Skip to content

Commit

Permalink
[bugfix] text as subquery fails with 'Series Limit' (#1347)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Oct 18, 2016
1 parent ecb951b commit 8f29944
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ def visit_column(element, compiler, **kw):

# Supporting arbitrary SQL statements in place of tables
if self.sql:
tbl = text('(' + self.sql + ') as expr_qry ')
tbl = TextAsFrom(sqla.text(self.sql), []).alias('expr_qry')

if not columns:
qry = qry.group_by(*groupby_exprs)
Expand Down
2 changes: 2 additions & 0 deletions caravel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,8 @@ def sqllab_viz(self):
'groupby': dims[0].column_name if dims else '',
'metrics': metrics[0].metric_name if metrics else '',
'metric': metrics[0].metric_name if metrics else '',
'since': '100 years ago',
'limit': '0',
}
params = "&".join([k + '=' + v for k, v in params.items()])
url = '/caravel/explore/table/{table.id}/?{params}'.format(**locals())
Expand Down

0 comments on commit 8f29944

Please sign in to comment.