Skip to content

Commit

Permalink
[bugfix] text as subquery fails with 'Series Limit' (apache#1347)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and naveen yannamani committed Oct 24, 2016
1 parent 4f2cfa5 commit 19d8616
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 19d8616

Please sign in to comment.