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

Hotfix. Put back a default count * metric #2091

Merged
merged 1 commit into from
Feb 2, 2017
Merged

Hotfix. Put back a default count * metric #2091

merged 1 commit into from
Feb 2, 2017

Conversation

bkyryliuk
Copy link
Member

No description provided.

@ascott
Copy link

ascott commented Feb 2, 2017

did you test this in explore v1 and v2? i don't see why it would work for one and not the other, but would be good to double check.

@bkyryliuk bkyryliuk merged commit 6b2eb04 into apache:master Feb 2, 2017
@bkyryliuk bkyryliuk deleted the fix_druid branch February 2, 2017 00:53
@@ -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']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mostly-safe assumption as we create that metric on behalf of the user. Though a user could remove that metric, of a new datasource type may not know that it has to create a count by default.

I had to dealt with this while deprecating v1 as defaults are now set on the client side and decided to take the first metric from the list of possible metric for the datasource.

I'm fine either way, just wanted to chime in.

SalehHindi pushed a commit to SalehHindi/superset that referenced this pull request Jun 9, 2017
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.16.0 labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants