dpgaspar commented on code in PR #23226:
URL: https://github.com/apache/superset/pull/23226#discussion_r1136726272
##########
superset/sqllab/api.py:
##########
@@ -70,17 +73,70 @@ class SqlLabRestApi(BaseSupersetApi):
class_permission_name = "SQLLab"
+ estimate_model_schema = EstimateQueryCostSchema()
execute_model_schema = ExecutePayloadSchema()
apispec_parameter_schemas = {
"sql_lab_get_results_schema": sql_lab_get_results_schema,
}
openapi_spec_tag = "SQL Lab"
openapi_spec_component_schemas = (
+ EstimateQueryCostSchema,
ExecutePayloadSchema,
QueryExecutionResponseSchema,
)
+ @expose("/estimate/", methods=["POST"])
+ @protect()
+ @statsd_metrics
+ @requires_json
+ @permission_name("get")
Review Comment:
sorry, having second thoughts on this, let's remove it and leave the
permission has it is. `can estimate query cost on SQLLab`. Also add that
permission here:
https://github.com/apache/superset/blob/master/superset/security/manager.py#L253
--
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]