You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/11/26 00:20:21 UTC

[GitHub] [incubator-superset] betodealmeida opened a new pull request #8652: Pass full response to `query_cost_formatter`

betodealmeida opened a new pull request #8652: Pass full response to `query_cost_formatter`
URL: https://github.com/apache/incubator-superset/pull/8652
 
 
   ### CATEGORY
   
   Choose one
   
   - [ ] Bug Fix
   - [X] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   When estimating the cost of queries using Presto we currently pass only the actual estimate to `query_cost_formatter`. I modified it so it passes the full response from Presto, which allows us to log which table(s) and partition(s) are being queried.
   
   Basically, instead of returning `response["estimate"]` this PR makes it return `response`, and the formatter will extract the estimate. Custom formatters defined in `superset_config.py` will have access to the full response, including `inputTableColumnInfos`.
   
   <!-- ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF -->
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Added unit test for `query_cost_formatter`, and tested locally.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   
   @khtruong @DiggidyDave 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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