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/09/18 00:43:10 UTC

[GitHub] [incubator-superset] betodealmeida opened a new pull request #8243: Show Presto views as views, not tables

betodealmeida opened a new pull request #8243: Show Presto views as views, not tables
URL: https://github.com/apache/incubator-superset/pull/8243
 
 
   ### 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 -->
   
   Currently, Presto displays views as tables, since the statement `SHOW TABLES` shows both views and tables, and there's no `SHOW VIEWS`.
   
   One workaround to get the list of views is to query the `information_schema` schema:
   
   ```sql
   SELECT table_name FROM information_schema_views WHERE table_schema='default';
   ```
   
   This returns the actual list of views, but it's slow. On our Presto cluster it takes approximately 90 seconds to get all the views across all schemas. Fortunately, the API that exposes the views is cached, so this shouldn't be too bad.
   
   I added a new feature flag, `PRESTO_SPLIT_VIEWS_FROM_TABLES` (open for better name suggestions), that when enabled will show views differently than tables in SQL Lab.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   Now views are properly marked as such in Presto:
   
   <img width="286" alt="Screen Shot 2019-09-17 at 5 37 27 PM" src="https://user-images.githubusercontent.com/1534870/65093650-e51e2280-d971-11e9-8eec-9d1442fcf1ee.png">
   
   
   <!-- ### TEST PLAN -->
   <!--- What steps should be taken to verify the changes -->
   
   ### 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 @etr2460 

----------------------------------------------------------------
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