From commits-return-747-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Sat Mar 10 00:28:17 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 F28D518064A for ; Sat, 10 Mar 2018 00:28:16 +0100 (CET) Received: (qmail 22690 invoked by uid 500); 9 Mar 2018 23:28:16 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 22681 invoked by uid 99); 9 Mar 2018 23:28:16 -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, 09 Mar 2018 23:28:15 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 4C73E808A0; Fri, 9 Mar 2018 23:28:15 +0000 (UTC) Date: Fri, 09 Mar 2018 23:28:15 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Return __time in Druid scan (#4504) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152063809514.30255.18265091773468880994@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: c6af4882cd4e5eb5a777ca7720ca783e309a6b36 X-Git-Newrev: 16470044863555b42bfb2aaddecce68b589d0da1 X-Git-Rev: 16470044863555b42bfb2aaddecce68b589d0da1 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git The following commit(s) were added to refs/heads/master by this push: new 1647004 Return __time in Druid scan (#4504) 1647004 is described below commit 16470044863555b42bfb2aaddecce68b589d0da1 Author: Beto Dealmeida AuthorDate: Fri Mar 9 15:28:11 2018 -0800 Return __time in Druid scan (#4504) * Return __time in Druid scan * use constant instead of __timestamp * Fix lint --- superset/assets/visualizations/deckgl/layers/scatter.jsx | 2 +- superset/connectors/druid/models.py | 4 +++- superset/viz.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/superset/assets/visualizations/deckgl/layers/scatter.jsx b/superset/assets/visualizations/deckgl/layers/scatter.jsx index 087df3d..26d320c 100644 --- a/superset/assets/visualizations/deckgl/layers/scatter.jsx +++ b/superset/assets/visualizations/deckgl/layers/scatter.jsx @@ -14,7 +14,7 @@ import { unitToRadius } from '../../../javascripts/modules/geo'; import sandboxedEval from '../../../javascripts/modules/sandbox'; function getStep(timeGrain) { - // grain in microseconds + // grain in milliseconds const MINUTE = 60 * 1000; const HOUR = 60 * MINUTE; const DAY = 24 * HOUR; diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py index a16baf1..0541af0 100644 --- a/superset/connectors/druid/models.py +++ b/superset/connectors/druid/models.py @@ -130,7 +130,8 @@ class DruidCluster(Model, AuditMixinNullable, ImportMixin): return json.loads(requests.get(endpoint).text) def get_druid_version(self): - endpoint = self.get_base_coordinator_url() + '/status' + endpoint = self.get_base_url( + self.coordinator_host, self.coordinator_port) + '/status' return json.loads(requests.get(endpoint).text)['version'] def refresh_datasources( @@ -1114,6 +1115,7 @@ class DruidDatasource(Model, BaseDatasource): order_direction = 'descending' if order_desc else 'ascending' if columns: + columns.append('__time') del qry['post_aggregations'] del qry['aggregations'] qry['dimensions'] = columns diff --git a/superset/viz.py b/superset/viz.py index 9225e5d..9bbf538 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -2039,7 +2039,7 @@ class DeckScatterViz(BaseDeckGLViz): 'radius': self.fixed_value if self.fixed_value else d.get(self.metric), 'cat_color': d.get(self.dim) if self.dim else None, 'position': d.get('spatial'), - '__timestamp': d.get('__timestamp'), + '__timestamp': d.get(DTTM_ALIAS) or d.get('__time'), } def get_data(self, df): -- To stop receiving notification emails like this one, please contact maximebeauchemin@apache.org.