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: use execution context instead of query #16677

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

ofekisr
Copy link
Contributor

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

The PR focus on start using execution context to create the final response and get an execution status from the private method who will be refactored soon to a Command class
This is the second PR who build the basis so the code will be able to be separated into layers

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

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.

rename SqlJsonExecutionStatus options

superset/views/core.py Outdated Show resolved Hide resolved
superset/views/core.py Outdated Show resolved Hide resolved
superset/views/core.py Outdated Show resolved Hide resolved
superset/views/core.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 12, 2021

Codecov Report

Merging #16677 (c771629) into master (51acada) will increase coverage by 0.01%.
The diff coverage is 96.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16677      +/-   ##
==========================================
+ Coverage   76.91%   76.93%   +0.01%     
==========================================
  Files        1005     1005              
  Lines       54017    54044      +27     
  Branches     7337     7337              
==========================================
+ Hits        41549    41577      +28     
+ Misses      12228    12227       -1     
  Partials      240      240              
Flag Coverage Δ
hive 81.27% <96.66%> (+0.02%) ⬆️
mysql 81.65% <96.61%> (+0.02%) ⬆️
postgres 81.71% <96.66%> (+0.02%) ⬆️
presto 81.52% <96.66%> (+0.02%) ⬆️
python 82.22% <96.66%> (+0.02%) ⬆️
sqlite 81.32% <96.61%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
superset/views/core.py 76.63% <96.15%> (+0.38%) ⬆️
superset/utils/sqllab_execution_context.py 92.37% <100.00%> (+0.55%) ⬆️

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 51acada...c771629. 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.

LGTM

@amitmiran137 amitmiran137 merged commit 1cc7263 into apache:master Sep 13, 2021
@amitmiran137 amitmiran137 deleted the refactor/sql_json_view12 branch September 13, 2021 08:04
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…ery (apache#16677)

* refactor sql_json view endpoint: use execution context instead of query

* fix failed tests

* fix failed tests

* refactor renaming enum options
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
…ery (apache#16677)

* refactor sql_json view endpoint: use execution context instead of query

* fix failed tests

* fix failed tests

* refactor renaming enum options
@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.

None yet

3 participants