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: sql_json view endpoint: extract to method for code reusing #16546

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

ofekisr
Copy link
Contributor

@ofekisr ofekisr commented Sep 1, 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 third PR in the sequence of future PRs (previous PR) try to solve it by refactoring the code.
The PR focus of extract to a method for code reusing
TESTING INSTRUCTIONS
there are no logic changes so it implies on the current tests.

@ofekisr ofekisr changed the title Refactor/sql json view3 refactor: sql_json view endpoint: encapsulate ctas parameters Sep 1, 2021
@ofekisr ofekisr force-pushed the refactor/sql_json_view3 branch from f85726c to e3567c3 Compare September 1, 2021 15:01
@pull-request-size pull-request-size bot added size/S and removed size/L labels Sep 1, 2021
@ofekisr ofekisr force-pushed the refactor/sql_json_view3 branch from e3567c3 to 2b8c67f Compare September 1, 2021 15:02
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #16546 (819cf56) into master (80c39da) will decrease coverage by 0.13%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master   #16546      +/-   ##
==========================================
- Coverage   76.72%   76.58%   -0.14%     
==========================================
  Files        1002     1002              
  Lines       53798    53801       +3     
  Branches     6858     6858              
==========================================
- Hits        41274    41202      -72     
- Misses      12287    12362      +75     
  Partials      237      237              
Flag Coverage Δ
hive ?
mysql 81.54% <100.00%> (+<0.01%) ⬆️
postgres 81.57% <100.00%> (+<0.01%) ⬆️
presto 81.37% <100.00%> (-0.04%) ⬇️
python 81.80% <100.00%> (-0.27%) ⬇️
sqlite ?

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

Impacted Files Coverage Δ
superset/views/core.py 75.59% <100.00%> (+0.05%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.80% <0.00%> (-16.87%) ⬇️
superset/db_engine_specs/sqlite.py 91.89% <0.00%> (-5.41%) ⬇️
superset/connectors/sqla/utils.py 88.23% <0.00%> (-3.93%) ⬇️
superset/utils/celery.py 86.20% <0.00%> (-3.45%) ⬇️
superset/result_set.py 96.77% <0.00%> (-1.62%) ⬇️
superset/utils/cache.py 73.58% <0.00%> (-0.95%) ⬇️
superset/connectors/sqla/models.py 89.46% <0.00%> (-0.24%) ⬇️
superset/utils/core.py 89.76% <0.00%> (-0.13%) ⬇️
... and 1 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 80c39da...2b8c67f. Read the comment docs.

@ofekisr ofekisr changed the title refactor: sql_json view endpoint: encapsulate ctas parameters refactor: sql_json view endpoint: extract to method for code reusing Sep 1, 2021
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.

Clear method extraction.
LGTM!

@amitmiran137 amitmiran137 merged commit e947f8a into apache:master Sep 1, 2021
@junlincc
Copy link
Member

junlincc commented Sep 1, 2021

is there any risks that we should be aware of from those refactoring PRs?

opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@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/S 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants