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

refactor: sqllab: move sqllab ralated enumns and utils to more logical place #16843

Merged
merged 4 commits into from
Sep 26, 2021

Conversation

ofekisr
Copy link
Contributor

@ofekisr ofekisr commented Sep 26, 2021

SUMMARY
The sql_json view code in superset core view without any "clean code" standard and it does not adopt any software development principle.

This is the fourteenth PR in the sequence of future PRs ([previous PR](refactor: sql_json view endpoint: move all logic from view to Command class)) try to solve it by refactoring the code.

The PR focus on moving QueryStatus and LimitingFactor and sqllab utils to more precise place

actually, there are no logic changes so it implies on the current tests.

@codecov
Copy link

codecov bot commented Sep 26, 2021

Codecov Report

Merging #16843 (2e875b9) into master (a341319) will decrease coverage by 0.21%.
The diff coverage is 92.06%.

❗ Current head 2e875b9 differs from pull request most recent head 1eac48c. Consider uploading reports for the commit 1eac48c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16843      +/-   ##
==========================================
- Coverage   77.00%   76.79%   -0.22%     
==========================================
  Files        1018     1021       +3     
  Lines       54687    54716      +29     
  Branches     7461     7461              
==========================================
- Hits        42112    42018      -94     
- Misses      12331    12454     +123     
  Partials      244      244              
Flag Coverage Δ
hive ?
mysql 81.84% <92.06%> (+<0.01%) ⬆️
postgres 81.91% <92.06%> (+<0.01%) ⬆️
presto ?
python 81.99% <92.06%> (-0.42%) ⬇️
sqlite 81.52% <92.06%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
superset/db_engine_specs/base.py 88.17% <ø> (-0.41%) ⬇️
superset/utils/sqllab_execution_context.py 92.37% <ø> (-0.07%) ⬇️
superset/connectors/sqla/models.py 85.59% <60.00%> (-1.64%) ⬇️
superset/viz.py 57.93% <62.50%> (+0.02%) ⬆️
superset/common/db_query_status.py 100.00% <100.00%> (ø)
superset/common/query_actions.py 92.64% <100.00%> (+0.10%) ⬆️
superset/common/query_context.py 90.78% <100.00%> (+0.04%) ⬆️
superset/common/utils.py 88.88% <100.00%> (+0.13%) ⬆️
superset/db_engine_specs/druid.py 86.27% <100.00%> (ø)
superset/db_engine_specs/hive.py 69.80% <100.00%> (-16.87%) ⬇️
... and 21 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 a341319...1eac48c. Read the comment docs.

Copy link
Member

@amitmiran137 amitmiran137 left a comment

Choose a reason for hiding this comment

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

Basic extraction refactor
LGTM!

@amitmiran137 amitmiran137 merged commit c520eb7 into apache:master Sep 26, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…l place (apache#16843)

* refactor move QueryStatus to common

* refactor move apply_display_max_row_limit to sqllab package

* refactor move limiting_factor to sqllab package

* fix pylint issues
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
…l place (apache#16843)

* refactor move QueryStatus to common

* refactor move apply_display_max_row_limit to sqllab package

* refactor move limiting_factor to sqllab package

* fix pylint issues
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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/L 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants