graceguo-supercat closed pull request #5214: Moving homogenize_types to after
no data exception
URL: https://github.com/apache/incubator-superset/pull/5214
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/connectors/druid/models.py
b/superset/connectors/druid/models.py
index 2cd2e4cd63..6fb44b3088 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -1331,10 +1331,10 @@ def query(self, query_obj):
client=client, query_obj=query_obj, phase=2)
df = client.export_pandas()
- df = self.homogenize_types(df, query_obj.get('groupby', []))
-
if df is None or df.size == 0:
raise Exception(_('No data was returned.'))
+
+ df = self.homogenize_types(df, query_obj.get('groupby', []))
df.columns = [
DTTM_ALIAS if c in ('timestamp', '__time') else c
for c in df.columns
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]