Skip to content

Commit

Permalink
Put back a default count * metric (#2091)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkyryliuk committed Feb 2, 2017
1 parent 898d80b commit 6b2eb04
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions superset/models.py
Expand Up @@ -1320,15 +1320,8 @@ def query( # sqla
for s in columns:
select_exprs.append(cols[s].sqla_col)
metrics_exprs = []
elif not is_timeseries:
# use all columns if none were specified
for col_obj in cols.values():
select_exprs.append(col_obj.sqla_col)
metrics_exprs = []
row_limit = row_limit or 100

if granularity:

@compiles(ColumnClause)
def visit_column(element, compiler, **kw):
"""Patch for sqlalchemy bug
Expand Down
2 changes: 1 addition & 1 deletion superset/viz.py
Expand Up @@ -269,7 +269,7 @@ def query_obj(self):
"""Building a query object"""
form_data = self.form_data
groupby = form_data.get("groupby") or []
metrics = form_data.get("metrics") or []
metrics = form_data.get("metrics") or ['count']
extra_filters = self.get_extra_filters()
granularity = (
form_data.get("granularity") or form_data.get("granularity_sqla")
Expand Down

0 comments on commit 6b2eb04

Please sign in to comment.