You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/11 02:25:36 UTC

[GitHub] [incubator-superset] john-bodley commented on a change in pull request #8948: [fix] Enforce the QueryResult.df to be a pandas.DataFrame (Phase II)

john-bodley commented on a change in pull request #8948: [fix] Enforce the QueryResult.df to be a pandas.DataFrame (Phase II)
URL: https://github.com/apache/incubator-superset/pull/8948#discussion_r365492028
 
 

 ##########
 File path: superset/common/query_context.py
 ##########
 @@ -129,15 +129,14 @@ def get_data(  # pylint: disable=invalid-name,no-self-use
     def get_single_payload(self, query_obj: QueryObject) -> Dict[str, Any]:
         """Returns a payload of metadata and data"""
         payload = self.get_df_payload(query_obj)
-        df = payload.get("df")
-        status = payload.get("status")
+        df = payload["df"]
 
 Review comment:
   Note the `get` is not required as `get_df_payload` is guaranteed to return a dictionary with the `df` and `status` keys per [here](https://github.com/apache/incubator-superset/blob/5b690f94116b5b77c0af566d24f298cc6db469b9/superset/common/query_context.py#L234).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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