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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to