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

bugfix: Oracle timegrains fail to render when wrapped in outer query #7767

Merged
merged 3 commits into from
Jun 26, 2019
Merged

bugfix: Oracle timegrains fail to render when wrapped in outer query #7767

merged 3 commits into from
Jun 26, 2019

Conversation

villebro
Copy link
Member

@villebro villebro commented Jun 24, 2019

CATEGORY

  • Bug Fix

SUMMARY

This bug is slightly related to #7729 , where Oracle is forced to wrap an additional query around the original query. This causes the SQLAlchemy compiler to create a new column object based on the original TimestampExpression, which doesn't receive a column (is only supposed to have the label of the original object), and hence is unable to complete the compilation. This is solved by passing a ColumnClause class to the method via the _constructor property that creates the outer query proxy column, which solves the problem.

Before

image

After

image

TEST PLAN

Tested locally to work on sqlite (regression testing) and Oracle, with and without time grain.

ADDITIONAL INFORMATION

REVIEWERS

@devilzhangzzz

@villebro villebro changed the title [WIP] bugfix: Oracle timegrains fail to render when wrapped in outer query bugfix: Oracle timegrains fail to render when wrapped in outer query Jun 25, 2019
@villebro
Copy link
Member Author

Oracle seems to be pushing me ever deeper into this rabbit hole of proxied label elements.. Hope this is the last of this. This is now ready for review @devilzhangzzz @mistercrunch @john-bodley

@codecov-io
Copy link

Codecov Report

Merging #7767 into master will decrease coverage by 0.14%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7767      +/-   ##
==========================================
- Coverage   65.71%   65.56%   -0.15%     
==========================================
  Files         459      459              
  Lines       21981    21983       +2     
  Branches     2415     2415              
==========================================
- Hits        14445    14414      -31     
- Misses       7415     7448      +33     
  Partials      121      121
Impacted Files Coverage Δ
superset/db_engine_specs/base.py 87.98% <50%> (-0.33%) ⬇️
superset/db_engine_specs/mysql.py 34.88% <0%> (-58.14%) ⬇️
superset/models/core.py 83.02% <0%> (-0.62%) ⬇️
superset/views/core.py 72.87% <0%> (-0.21%) ⬇️

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 5c58fd1...98791b0. Read the comment docs.

@villebro villebro merged commit ebb7fbc into apache:master Jun 26, 2019
@villebro villebro deleted the oracle_outer_timegrain branch June 26, 2019 05:57
@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/S 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When connecting to the oracle database, an error is reported when making a line chart
3 participants