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/12/03 22:10:05 UTC

[GitHub] [incubator-superset] betodealmeida opened a new pull request #8739: Change column to longtext

betodealmeida opened a new pull request #8739: Change column to longtext
URL: https://github.com/apache/incubator-superset/pull/8739
 
 
   ### 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 -->
   
   The column `description` in the table `table_schema` currently has type text, being limited to 65535 characters in MySQL. Since the column is used to store JSON, and the values can be quite large, any JSON with more than 65535 that is stored will be truncated, becoming invalid.
   
   I added a migration script to change the type to long text in MySQL. I also wrapped the decoding of the column in a try/except block to prevent locking users out of SQL Lab in case the JSON is malformed (though it shouldn't happen again after this fix). I also added code to the frontend to handle the description being null; in that case the table is not show in SQL Lab, since we don't have the required information.
   
   <!-- ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF -->
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Tested migration, and tested that if the JSON is invalid SQL Lab works, although not showing the metadata for the table (as expected).
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [X] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   
   @khtruong 

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