This is an automated email from the ASF dual-hosted git repository. johnbodley pushed a commit to branch john-bodley--fix-pydruid-export-pandas in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 3da9311d53e2f904d6f7f08109605ff44df6c48b Author: John Bodley <4567245+john-bod...@users.noreply.github.com> AuthorDate: Thu Jan 23 13:26:22 2020 -0800 [fix] pydruid export_pandas --- superset/connectors/druid/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py index 2134468..b330110 100644 --- a/superset/connectors/druid/models.py +++ b/superset/connectors/druid/models.py @@ -1263,7 +1263,7 @@ class DruidDatasource(Model, BaseDatasource): if phase == 1: return query_str query_str += "// Phase 2 (built based on phase one's results)\n" - df = client.export_pandas() + df = client.export_pandas() or pd.DataFrame() qry["filter"] = self._add_filter_from_pre_query_data( df, [pre_qry["dimension"]], filters ) @@ -1331,7 +1331,7 @@ class DruidDatasource(Model, BaseDatasource): if phase == 1: return query_str query_str += "// Phase 2 (built based on phase one's results)\n" - df = client.export_pandas() + df = client.export_pandas() or pd.DataFrame() qry["filter"] = self._add_filter_from_pre_query_data( df, pre_qry["dimensions"], filters ) @@ -1375,7 +1375,7 @@ class DruidDatasource(Model, BaseDatasource): qry_start_dttm = datetime.now() client = self.cluster.get_pydruid_client() query_str = self.get_query_str(client=client, query_obj=query_obj, phase=2) - df = client.export_pandas() + df = client.export_pandas() or pd.DataFrame() if df.empty: return QueryResult(