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(migrations): coalesce is_temporal when inserting into sl_columns #19786

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

cemremengu
Copy link
Contributor

@cemremengu cemremengu commented Apr 20, 2022

SUMMARY

null value in column "is_temporal" of relation "sl_columns" violates not-null constraint when mapping existing data.

INFO  [alembic.runtime.migration] Running upgrade ad07e4fdbaba -> a9422eeaae74, new_dataset_models_take_2
>> Copy 12 physical tables to sl_tables...
>> Copy 41 SqlaTable to sl_datasets...
   Copy dataset owners...
   Link physical datasets with tables...
>> Copy 2,326 table columns to sl_columns...
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.NotNullViolation: null value in column "is_temporal" of relation "sl_columns" violates not-null constraint
DETAIL:  Failing row contains (368c1f15-f08d-440b-b21d-b113e1a4e42d, 2021-12-03 08:09:13.776918, 2021-12-03 21:20:46.402427, 27, null, f, f, t, t, t, f, f, t, null, f, default_serial_num, STRING, null, , null, null, null, {"warning_markdown":null}, 1, 1).

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #19786 (72f6eb9) into master (22a92ed) will increase coverage by 0.10%.
The diff coverage is n/a.

❗ Current head 72f6eb9 differs from pull request most recent head dadcf91. Consider uploading reports for the commit dadcf91 to get more accurate results

@@            Coverage Diff             @@
##           master   #19786      +/-   ##
==========================================
+ Coverage   66.40%   66.51%   +0.10%     
==========================================
  Files        1690     1690              
  Lines       64732    64732              
  Branches     6656     6656              
==========================================
+ Hits        42987    43056      +69     
+ Misses      20046    19977      -69     
  Partials     1699     1699              
Flag Coverage Δ
hive 52.87% <ø> (?)
mysql 81.89% <ø> (ø)
postgres 81.93% <ø> (ø)
presto 52.72% <ø> (ø)
python 82.36% <ø> (+0.21%) ⬆️
sqlite 81.70% <ø> (ø)
unit 47.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/utils/core.py 89.83% <0.00%> (+0.11%) ⬆️
superset/connectors/sqla/models.py 90.04% <0.00%> (+0.18%) ⬆️
superset/db_engine_specs/base.py 88.35% <0.00%> (+0.33%) ⬆️
superset/db_engine_specs/hive.py 85.82% <0.00%> (+15.70%) ⬆️
superset/db_engines/hive.py 85.18% <0.00%> (+85.18%) ⬆️

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 22a92ed...dadcf91. Read the comment docs.

@cemremengu cemremengu changed the title fix(migrations): sl_columns is_temporal mapping fix(migrations): coalesce is_temporal when inserting into sl_columns Apr 20, 2022
@ktmud ktmud merged commit 9c20299 into apache:master Apr 20, 2022
@ktmud
Copy link
Member

ktmud commented Apr 20, 2022

Thanks! This looks good.

@cemremengu cemremengu deleted the patch-9 branch April 20, 2022 14:42
hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 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/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants