You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "diegomedina248 (via GitHub)" <gi...@apache.org> on 2023/02/07 02:01:05 UTC

[GitHub] [superset] diegomedina248 commented on a diff in pull request #22910: chore: Migrate /superset/estimate_query_cost/// to API v1

diegomedina248 commented on code in PR #22910:
URL: https://github.com/apache/superset/pull/22910#discussion_r1098098195


##########
superset/sqllab/api.py:
##########
@@ -68,17 +70,71 @@ class SqlLabRestApi(BaseSupersetApi):
 
     class_permission_name = "Query"
 
+    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"])

Review Comment:
   It's a balancing act here, I agree.
   I think the database resource is bloated already, and while I could see usages outside SQL lab, we don't at the moment nor in the medium term (afaik).
   I could see arguments on both sides and I don't feel particularly strong about either of them



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org