ofekisr commented on a change in pull request #16991:
URL: https://github.com/apache/superset/pull/16991#discussion_r732141563
##########
File path: superset/charts/api.py
##########
@@ -617,7 +619,7 @@ def get_data(self, pk: int) -> Response:
json_body["result_type"] = request.args.get("type",
ChartDataResultType.FULL)
try:
- command = ChartDataCommand()
+ command = self._create_chart_data_command()
Review comment:
> is there a specific reason why we are wrapping the chart command in a
private function?
1. Prevent reuse code
2. The way the command is created is not the function task, SRP,
3. The one who follows the code, don't care how the command is creates he
just want to get the command and run it, if it still interested it steps into
the private method
--
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]