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

fix(db-engine-spec): execute oracle DML statement bug in sqllab #10706

Merged
merged 8 commits into from
Aug 31, 2020
Merged

fix(db-engine-spec): execute oracle DML statement bug in sqllab #10706

merged 8 commits into from
Aug 31, 2020

Conversation

chuancyzhang
Copy link
Contributor

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error.

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
cursor.description ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Small comment, other than that LGTM!

@villebro villebro changed the title fix execute oracle DML statement bug in sqllab fix(db-engine-spec): execute oracle DML statement bug in sqllab Aug 28, 2020
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2020

Codecov Report

Merging #10706 into master will increase coverage by 0.24%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10706      +/-   ##
==========================================
+ Coverage   64.76%   65.00%   +0.24%     
==========================================
  Files         789      788       -1     
  Lines       37091    37175      +84     
  Branches     3555     3554       -1     
==========================================
+ Hits        24021    24166     +145     
+ Misses      12963    12902      -61     
  Partials      107      107              
Flag Coverage Δ
#cypress 55.85% <ø> (+0.23%) ⬆️
#javascript 61.53% <ø> (+0.17%) ⬆️
#python 60.28% <50.00%> (+0.25%) ⬆️

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

Impacted Files Coverage Δ
superset/db_engine_specs/oracle.py 81.25% <50.00%> (-7.64%) ⬇️
superset-frontend/src/views/App.tsx 32.35% <0.00%> (-25.55%) ⬇️
superset/db_engine_specs/sqlite.py 65.62% <0.00%> (-9.38%) ⬇️
superset/db_engines/hive.py 82.14% <0.00%> (-3.58%) ⬇️
...ntend/src/dashboard/components/PublishedStatus.jsx 61.90% <0.00%> (-1.74%) ⬇️
superset/result_set.py 96.69% <0.00%> (-1.66%) ⬇️
...end/src/SqlLab/components/RunQueryActionButton.tsx 68.18% <0.00%> (-1.39%) ⬇️
superset-frontend/src/components/Menu/Menu.tsx 94.93% <0.00%> (-1.15%) ⬇️
superset/sql_lab.py 78.26% <0.00%> (-0.44%) ⬇️
...ontend/src/explore/components/QueryAndSaveBtns.jsx 91.66% <0.00%> (-0.34%) ⬇️
... and 49 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 c715cad...bca16fa. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix and your patience!

@villebro villebro merged commit 234b6bb into apache:master Aug 31, 2020
villebro added a commit to preset-io/superset that referenced this pull request Sep 2, 2020
…he#10706)

* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
villebro added a commit to preset-io/superset that referenced this pull request Sep 2, 2020
…he#10706)

* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
villebro added a commit that referenced this pull request Sep 5, 2020
* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
@dpgaspar dpgaspar added the v0.38 label Sep 9, 2020
dpgaspar pushed a commit to preset-io/superset that referenced this pull request Sep 10, 2020
…he#10706)

* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
villebro added a commit to preset-io/superset that referenced this pull request Sep 11, 2020
…he#10706)

* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
villebro added a commit that referenced this pull request Sep 11, 2020
* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
villebro added a commit that referenced this pull request Sep 16, 2020
* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
…he#10706)

* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
@chuancyzhang chuancyzhang deleted the patch-3 branch July 27, 2021 02:56
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…he#10706)

* fix execute oracle DML statement bug in sqllab

when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. 

Refer https://www.python.org/dev/peps/pep-0249/, superset old version use
`cursor.description` ,because this attribute will be None for operations that do not return rows or if the cursor has not had an operation invoked via the .execute*() method yet.

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update oracle.py

* Update oracle.py

* Apply suggestions from code review

Co-authored-by: Ville Brofeldt <[email protected]>

* Update oracle.py

* Update superset/db_engine_specs/oracle.py

Co-authored-by: Ville Brofeldt <[email protected]>

Co-authored-by: Ville Brofeldt <[email protected]>
@mistercrunch mistercrunch added 🍒 0.37.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.0 labels Mar 12, 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 v0.37 v0.37.2 v0.38 🍒 0.37.2 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants