You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/01 15:45:29 UTC

[GitHub] mistercrunch commented on a change in pull request #5118: Adding the MetricsControl to the timeseries_limit_metric field

mistercrunch commented on a change in pull request #5118: Adding the MetricsControl to the timeseries_limit_metric field
URL: https://github.com/apache/incubator-superset/pull/5118#discussion_r192437378
 
 

 ##########
 File path: superset/connectors/druid/models.py
 ##########
 @@ -1148,6 +1148,11 @@ def run_query(  # noqa / druid
                     metric['column']['type'].upper() == 'FLOAT'
                 ):
                     metric['column']['type'] = 'DOUBLE'
+            if (
+                utils.is_adhoc_metric(timeseries_limit_metric) and
+                timeseries_limit_metric['column']['type'].upper() == 'FLOAT'
 
 Review comment:
   It's almost the exact same code as a few lines above, maybe refactor a `sanitize_metric_object` and put as much as possible in there.
   
   [probably out of scope for this PR] I'm starting to think we should make all metrics fit the same model (make predefined metrics look like custom metric objects) as early as possible in the stack and then treat them all the same way. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org