From notifications-return-1492-archive-asf-public=cust-asf.ponee.io@superset.apache.org Fri Jun 1 17:45:31 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1227718063A for ; Fri, 1 Jun 2018 17:45:30 +0200 (CEST) Received: (qmail 38764 invoked by uid 500); 1 Jun 2018 15:45:30 -0000 Mailing-List: contact notifications-help@superset.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.apache.org Delivered-To: mailing list notifications@superset.apache.org Received: (qmail 38755 invoked by uid 99); 1 Jun 2018 15:45:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2018 15:45:30 +0000 From: GitBox To: notifications@superset.apache.org Subject: [GitHub] mistercrunch commented on a change in pull request #5118: Adding the MetricsControl to the timeseries_limit_metric field Message-ID: <152786792963.5757.10389647971021222733.gitbox@gitbox.apache.org> Date: Fri, 01 Jun 2018 15:45:29 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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