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] Issue with previously defined SQL configuration #9082

Conversation

john-bodley
Copy link
Member

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

The get_sqla_engine method which mutates the URL overrides the configuration key within the SQLAlchemy connect_args params rather than updating it. This means that any database specific configuration options are simply ignored.

This PR ensures that the configuration is updated rather than overridden.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

Test locally on a Hive database and verified that PyHive was receiving the correct configuration.

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

REVIEWERS

to: @etr2460 @michellethomas @mistercrunch @villebro

d = params.get("connect_args", {})
d["configuration"] = configuration
params["connect_args"] = d
connect_args["configuration"] = configuration
Copy link
Member Author

Choose a reason for hiding this comment

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

I simply renamed d to the more descriptive connect_args.

@codecov-io
Copy link

codecov-io commented Feb 4, 2020

Codecov Report

Merging #9082 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9082   +/-   ##
=======================================
  Coverage   59.45%   59.45%           
=======================================
  Files         369      369           
  Lines       11752    11752           
  Branches     2889     2889           
=======================================
  Hits         6987     6987           
  Misses       4586     4586           
  Partials      179      179

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 540df26...b2924f7. Read the comment docs.

@john-bodley john-bodley force-pushed the john-bodley--fix-sqlalchemy-configuration branch from a2b0586 to b2924f7 Compare February 4, 2020 06:26
@john-bodley john-bodley merged commit 6cb4ce0 into apache:master Feb 4, 2020
@john-bodley john-bodley deleted the john-bodley--fix-sqlalchemy-configuration branch February 4, 2020 21:37
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 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 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants