etr2460 commented on a change in pull request #9753:
URL:
https://github.com/apache/incubator-superset/pull/9753#discussion_r422268409
##########
File path: superset/models/helpers.py
##########
@@ -374,13 +374,20 @@ class QueryResult: # pylint:
disable=too-few-public-methods
"""Object returned by the query interface"""
def __init__( # pylint: disable=too-many-arguments
- self, df, query, duration, status=QueryStatus.SUCCESS,
error_message=None
+ self,
+ df,
+ query,
+ duration,
+ status=QueryStatus.SUCCESS,
+ error_message=None,
+ errors=None,
):
self.df: pd.DataFrame = df
self.query: str = query
self.duration: int = duration
self.status: str = status
self.error_message: Optional[str] = error_message
+ self.errors: Optional[List[Dict[str, Any]]] = errors
Review comment:
I actually think it's better to keep this optional? Because at the end
of the day we send `errors` down to the client, and i think it being null is
better than `[]`
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]