etr2460 opened a new pull request #7641: [SQL Lab] Clarify SQL Lab query and 
display limits
URL: https://github.com/apache/incubator-superset/pull/7641
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Builds off of comments in 
https://github.com/apache/incubator-superset/pull/5392. Sets three row limits 
for the following uses.
   
   SQL_MAX_ROW: The upper limit for rows returned from any query. Prevents 
excessive load on the database
   DISPLAY_MAX_ROW: The upper limit for rows displayed in SQL Lab. Prevents 
browser crashes. Should be <= SQL_MAX_ROW
   DEFAULT_SQLLAB_LIMIT: The default limit for queries in SQL Lab. Can be 
overwritten by the user to any value between 1 and DISPLAY_MAX_ROW
   
   If anyone has other ideas to simplify this, I'm happy to take another stab 
at it. However, I think that with these three variables we can represent all 
levers required for admins and also prevent users from crashing their browsers.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   Warning text + tooltip if DISPLAY_MAX_ROW cuts off displayed results:
   <img width="1576" alt="Screen Shot 2019-06-03 at 1 14 12 PM" 
src="https://user-images.githubusercontent.com/7409244/58831406-81a9f800-8601-11e9-9604-908e50ac0c61.png";>
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   1. Set the DISPLAY_MAX_ROW value to something smaller
   1. Set your query limit in the SQL Lab UI higher than the DISPLAY_MAX_ROW 
value
   1. See LIMIT warning label with the warning message
   
   Also test:
   - Limits below the DISPLAY_MAX_ROW still work
   - CSV download isn't affected by DISPLAY_MAX_ROW
   - The limits are applied on both sync and async queries
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: Fixes #7590
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   @john-bodley, @michellethomas, @mistercrunch 

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