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: move all logic from view to Command class #16682

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

ofekisr
Copy link
Contributor

@ofekisr ofekisr commented Sep 13, 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 thirteenth PR in the sequence of future PRs (previous PR) try to solve it by refactoring the code.

The PR focus on separating all the logic of sql-json-execution to command class so the logic and view layers will be separated

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

@codecov
Copy link

codecov bot commented Sep 13, 2021

Codecov Report

Merging #16682 (64b3071) into master (1cc7263) will decrease coverage by 0.13%.
The diff coverage is 83.66%.

❗ Current head 64b3071 differs from pull request most recent head 4fc2219. Consider uploading reports for the commit 4fc2219 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16682      +/-   ##
==========================================
- Coverage   76.93%   76.79%   -0.14%     
==========================================
  Files        1005     1007       +2     
  Lines       54049    54086      +37     
  Branches     7339     7339              
==========================================
- Hits        41581    41536      -45     
- Misses      12228    12310      +82     
  Partials      240      240              
Flag Coverage Δ
hive ?
mysql ?
postgres 81.67% <83.33%> (-0.04%) ⬇️
presto 81.54% <83.66%> (+0.02%) ⬆️
python 81.95% <83.66%> (-0.28%) ⬇️
sqlite 81.31% <83.33%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
superset/sqllab/command.py 82.35% <82.35%> (ø)
superset/sqllab/command_status.py 100.00% <100.00%> (ø)
superset/views/core.py 75.80% <100.00%> (-0.83%) ⬇️
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/mysql.py 94.04% <0.00%> (-3.58%) ⬇️
superset/models/core.py 88.63% <0.00%> (-0.78%) ⬇️
superset/connectors/sqla/models.py 89.46% <0.00%> (-0.24%) ⬇️
superset/utils/core.py 89.76% <0.00%> (-0.13%) ⬇️
... and 2 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 1cc7263...4fc2219. Read the comment docs.

@ofekisr ofekisr force-pushed the refactor/sql_json_view13 branch from 69cbe40 to 4fc2219 Compare September 13, 2021 08:32
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.

nice decoupling the view layer and logic into a command that encapsulates query execution into a result object

@amitmiran137 amitmiran137 merged commit 29b635a into apache:master Sep 13, 2021
@amitmiran137 amitmiran137 deleted the refactor/sql_json_view13 branch September 13, 2021 17:05
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/XL 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants