villebro commented on a change in pull request #18569:
URL: https://github.com/apache/superset/pull/18569#discussion_r799630620
##########
File path: superset/views/core.py
##########
@@ -449,10 +449,16 @@ def get_raw_results(self, viz_obj: BaseViz) ->
FlaskResponse:
payload = viz_obj.get_df_payload()
if viz_obj.has_error(payload):
return json_error_response(payload=payload, status=400)
- return self.json_response({"data": payload["df"].to_dict("records")})
+ return self.json_response(
+ {
+ "data": payload["df"].to_dict("records"),
+ "colnames": payload["colnames"],
Review comment:
Do we need to make this `get`, just in case? I assume this will break if
someone has cached data from before this change and then runs the new code and
gets a cached payload without the "colnames" property.
```suggestion
"colnames": payload.get("colnames"),
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]