betodealmeida opened a new pull request #12186:
URL: https://github.com/apache/incubator-superset/pull/12186
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
`superset load_examples` is failing on Mysql:
```
File
"/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/sqlalchemy/sql/elements.py",
line 481, in compile
return self._compiler(dialect, bind=bind, **kw)
File
"/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/sqlalchemy/sql/ddl.py",
line 29, in _compiler
return dialect.ddl_compiler(dialect, self, **kw)
File
"/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py",
line 322, in __init__
self.string = self.process(self.statement, **compile_kwargs)
File
"/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py",
line 352, in process
return obj._compiler_dispatch(self, **kwargs)
File
"/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py",
line 96, in _compiler_dispatch
return meth(self, **kw)
File
"/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py",
line 2918, in visit_create_table
from_=ce,
File
"/Users/max/.pyenv/versions/3.7.7/envs/env37/lib/python3.7/site-packages/sqlalchemy/util/compat.py",
line 182, in raise_
raise exception
sqlalchemy.exc.CompileError: (in table 'video_game_sales', column 'Name'):
VARCHAR requires a length on dialect mysql
```
This PR fixes it by adding a default size for `VARCHAR` columns.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
N/A
### TEST PLAN
<!--- What steps should be taken to verify the changes -->
`superset load_examples` now work on MySQL.
### 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
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]