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(sqla): apply sqla type on calculated columns #14014

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Apr 8, 2021

SUMMARY

In the SQLA model, currently the inferred column type is only applied to regular columns but not calculated columns, which causes an exception to be raised when using a native select filter with temporal values. This change ensures that mapped column types are properly applied to both regular and calculated columns.

AFTER

image

BEFORE

image

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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 8, 2021

Codecov Report

Merging #14014 (629448b) into master (56dc74e) will increase coverage by 0.40%.
The diff coverage is 100.00%.

❗ Current head 629448b differs from pull request most recent head aa604a4. Consider uploading reports for the commit aa604a4 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14014      +/-   ##
==========================================
+ Coverage   78.87%   79.28%   +0.40%     
==========================================
  Files         936      936              
  Lines       47408    47408              
  Branches     5941     5938       -3     
==========================================
+ Hits        37393    37587     +194     
+ Misses       9883     9695     -188     
+ Partials      132      126       -6     
Flag Coverage Δ
cypress 56.04% <100.00%> (-3.06%) ⬇️
hive 75.45% <100.00%> (-4.83%) ⬇️
mysql 80.57% <100.00%> (ø)
postgres 80.60% <100.00%> (ø)
presto 80.29% <100.00%> (-0.01%) ⬇️
python 76.23% <100.00%> (-4.93%) ⬇️
sqlite 80.17% <100.00%> (ø)

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

Impacted Files Coverage Δ
...end/src/components/IndeterminateCheckbox/index.tsx 100.00% <ø> (ø)
...ntend/src/dashboard/components/CssEditor/index.jsx 95.83% <ø> (ø)
...nd/src/explore/components/DataTablesPane/index.tsx 88.88% <ø> (ø)
...ols/MetricControl/AdhocMetricEditPopover/index.jsx 84.09% <ø> (ø)
...et-frontend/src/components/TableView/TableView.tsx 98.21% <100.00%> (+1.78%) ⬆️
...tend/src/views/CRUD/annotation/AnnotationModal.tsx 62.96% <100.00%> (-0.28%) ⬇️
superset/connectors/sqla/models.py 90.76% <100.00%> (ø)
superset/db_engine_specs/presto.py 88.30% <0.00%> (-0.42%) ⬇️
...erset-frontend/src/SqlLab/components/ResultSet.tsx 69.56% <0.00%> (-0.31%) ⬇️
...rontend/src/SqlLab/components/AceEditorWrapper.tsx 61.25% <0.00%> (+1.25%) ⬆️
... and 31 more

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 56dc74e...aa604a4. Read the comment docs.

@villebro villebro merged commit b427a80 into apache:master Apr 8, 2021
@villebro villebro deleted the villebro/fix-temporal-expression branch April 8, 2021 07:59
@junlincc junlincc added rush! Requires immediate attention #bug:blocking! Blocking issues with high priority and removed #bug:blocking! Blocking issues with high priority rush! Requires immediate attention labels Apr 8, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 preset-io size/XS 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants