Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: SqlaColumn.type overflow on mysql #7606

Merged
merged 2 commits into from
Jun 3, 2019

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented May 29, 2019

CATEGORY

  • Bug Fix

SUMMARY

Future proofing for mysqlclient>=1.4, as extracting column types becomes more verbose and overflows our 32 char liimit on SqlaColumn.type

Type looks like 'VARCHAR(255) COLLATE utf8mb4_general_ci' suffix which is too
verbose and not needed in that context. Adding mysql-specific code that strips out the collation information.

Hitting a new error when loading examples around a datatype that exceeds
the 32 chars limit on SqlaColumn.type

Type includes the 'COLLATE utf8mb4_general_ci' suffix which is too
verbose and not needed in that context.
@mistercrunch mistercrunch force-pushed the fix_collate branch 3 times, most recently from a900b06 to f0b75be Compare June 1, 2019 01:14
@codecov-io
Copy link

codecov-io commented Jun 1, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@7dd6635). Click here to learn what that means.
The diff coverage is 90.9%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #7606   +/-   ##
========================================
  Coverage          ?   65.6%           
========================================
  Files             ?     435           
  Lines             ?   21704           
  Branches          ?    2387           
========================================
  Hits              ?   14239           
  Misses            ?    7344           
  Partials          ?     121
Impacted Files Coverage Δ
superset/connectors/sqla/models.py 81.98% <100%> (ø)
superset/db_engine_specs.py 67.44% <90%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7dd6635...eb9a779. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the MySQL change, but unsure about the get_timestamp_column method.

superset/db_engine_specs.py Outdated Show resolved Hide resolved
@mistercrunch mistercrunch merged commit 45b9880 into apache:master Jun 3, 2019
@mistercrunch mistercrunch deleted the fix_collate branch June 3, 2019 16:52
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants