You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/11/08 05:35:58 UTC
[incubator-superset] branch master updated: Fixed single extraction
dimension error (#3796)
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 dee4786 Fixed single extraction dimension error (#3796)
dee4786 is described below
commit dee47864c4f5e5dee6b54c09dcfb6842466ecea6
Author: Jeff Niu <je...@gmail.com>
AuthorDate: Tue Nov 7 21:35:56 2017 -0800
Fixed single extraction dimension error (#3796)
---
superset/connectors/druid/models.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py
index 1f5a040..3415d92 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -973,7 +973,13 @@ class DruidDatasource(Model, BaseDatasource):
if len(groupby) == 0 and not having_filters:
del qry['dimensions']
client.timeseries(**qry)
- if not having_filters and len(groupby) == 1 and order_desc:
+
+ if (
+ not having_filters and
+ len(groupby) == 1 and
+ order_desc and
+ not isinstance(list(qry.get('dimensions'))[0], dict)
+ ):
dim = list(qry.get('dimensions'))[0]
if timeseries_limit_metric:
order_by = timeseries_limit_metric
@@ -995,7 +1001,7 @@ class DruidDatasource(Model, BaseDatasource):
if phase == 1:
return query_str
query_str += (
- "//\nPhase 2 (built based on phase one's results)\n")
+ "// Phase 2 (built based on phase one's results)\n")
df = client.export_pandas()
qry['filter'] = self._add_filter_from_pre_query_data(
df,
@@ -1037,7 +1043,7 @@ class DruidDatasource(Model, BaseDatasource):
if phase == 1:
return query_str
query_str += (
- "//\nPhase 2 (built based on phase one's results)\n")
+ "// Phase 2 (built based on phase one's results)\n")
df = client.export_pandas()
qry['filter'] = self._add_filter_from_pre_query_data(
df,
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].